|
|
@@ -75,19 +75,12 @@ module.exports = {
|
|
75
|
75
|
groupings.map(grouping => grouping.grouping_id),
|
|
76
|
76
|
)
|
|
77
|
77
|
|
|
78
|
|
- // NOTE: Current implementation works okay, it only reveals the targetID's
|
|
79
|
|
- // hidden info on the page currently, it does NOT reveal OUR OWN information
|
|
80
|
|
- // to ourselves when revealed
|
|
81
|
|
-
|
|
82
|
78
|
/**
|
|
83
|
79
|
* Heavily process the result by storing just a profile_id
|
|
84
|
80
|
* and attach complete profiles
|
|
85
|
81
|
*/
|
|
86
|
|
- // NOTE: only returns the pId for the target
|
|
87
|
82
|
let pIds = groupings.reduce((ids, grouping) => {
|
|
88
|
83
|
grouping.profiles.forEach(p => {
|
|
89
|
|
- // you'd think to comment out here, but it still only returns CompleteProfile of target
|
|
90
|
|
- // pIds would be both currentProfile id and target id though
|
|
91
|
84
|
if (p.profile_id == profileId) return
|
|
92
|
85
|
ids.push(p.profile_id)
|
|
93
|
86
|
grouping.profile = p.profile_id
|
|
|
@@ -95,14 +88,12 @@ module.exports = {
|
|
95
|
88
|
delete grouping.profiles
|
|
96
|
89
|
return ids
|
|
97
|
90
|
}, [])
|
|
98
|
|
- console.log('pIds :=>', pIds) // only returns single array of target id
|
|
99
|
91
|
/** Assemble complete profiles to reference and pass */
|
|
100
|
92
|
const completedProfiles = await profileService.getProfilesFor(
|
|
101
|
93
|
pIds,
|
|
102
|
94
|
'participant',
|
|
103
|
95
|
false,
|
|
104
|
96
|
)
|
|
105
|
|
-
|
|
106
|
97
|
// NOTE: Doesn't rely on profile reveal field to get reveal tags
|
|
107
|
98
|
const getGroupingRevealTags = async () => {
|
|
108
|
99
|
const groupingRevealTags = []
|
|
|
@@ -142,7 +133,6 @@ module.exports = {
|
|
142
|
133
|
|
|
143
|
134
|
const completedProfilesWithRevealedInfo = await getRevealInfo()
|
|
144
|
135
|
|
|
145
|
|
- // ISSUE: renders target ID but not currentProfileID in ChatView.vue
|
|
146
|
136
|
const reformattedGroupings = groupings.map(g => {
|
|
147
|
137
|
completedProfilesWithRevealedInfo.forEach(p => {
|
|
148
|
138
|
g.profile = g.profile == p.profile_id ? p : g.profile
|
|
|
@@ -152,7 +142,7 @@ module.exports = {
|
|
152
|
142
|
)
|
|
153
|
143
|
return g
|
|
154
|
144
|
})
|
|
155
|
|
- console.log('reformattedGroupings :=>', reformattedGroupings)
|
|
|
145
|
+
|
|
156
|
146
|
try {
|
|
157
|
147
|
return {
|
|
158
|
148
|
ok: true,
|