|
|
@@ -44,15 +44,10 @@ class StonkAlert extends Toaster {
|
|
44
|
44
|
}
|
|
45
|
45
|
}
|
|
46
|
46
|
_appendTagsToGrouping(parsed) {
|
|
47
|
|
- console.log('_appendTagsToGrouping fired')
|
|
48
|
|
- // look inside the current profile for the groupings
|
|
49
|
|
- // get the grouping with the correct grouping id
|
|
50
|
|
- const foundGrouping = currentProfile.groupings.find(grouping =>
|
|
51
|
|
- grouping.grouping_id === parsed.grouping_id
|
|
|
47
|
+ const foundGrouping = currentProfile.groupings.find(async grouping =>
|
|
|
48
|
+ await grouping.grouping_id === parsed.grouping_id
|
|
52
|
49
|
)
|
|
53
|
|
-
|
|
54
|
50
|
if (foundGrouping) {
|
|
55
|
|
- // create a tag from the notification called tagFromNotification
|
|
56
|
51
|
const tagFromNotification = {
|
|
57
|
52
|
grouping_id: parsed.grouping_id,
|
|
58
|
53
|
is_deleted: 0,
|
|
|
@@ -63,22 +58,12 @@ class StonkAlert extends Toaster {
|
|
63
|
58
|
tag_category: "reveal",
|
|
64
|
59
|
tag_description: parsed.description,
|
|
65
|
60
|
tag_id: parsed.tag
|
|
66
|
|
- // tag_association:
|
|
67
|
61
|
}
|
|
68
|
62
|
}
|
|
69
|
63
|
const target_desc = `target_${parsed.description}`
|
|
70
|
64
|
tagFromNotification.tag[target_desc] = parsed.revealed_info
|
|
71
|
|
-
|
|
72
|
|
- // grouping.tags.push(tagFromNotification)
|
|
73
|
65
|
foundGrouping.tags.push(tagFromNotification)
|
|
74
|
|
- console.log(currentProfile)
|
|
75
|
|
- // TODO: finish this function, while it is viewable in the console
|
|
76
|
|
- // afterwards, I am confused as to how to "find the target"
|
|
77
|
|
-
|
|
78
|
|
- // find the target (other person in the grouping) and store the
|
|
79
|
|
- // information that came from the notification (target.profile.email
|
|
80
|
|
- // = email target.profile.name = name)
|
|
81
|
|
- // find a grouping_id from the notification
|
|
|
66
|
+ currentProfile._profile[parsed.description] = parsed.revealed_info
|
|
82
|
67
|
}
|
|
83
|
68
|
}
|
|
84
|
69
|
}
|