|
|
@@ -102,9 +102,10 @@ class Chatter {
|
|
102
|
102
|
|
|
103
|
103
|
// step 1: build the this.groupings object from the backend
|
|
104
|
104
|
this.getGroupingsByProfileId(this.uuid)
|
|
105
|
|
- // step 2: build the this.subscriptions array from the this.groupings object
|
|
106
|
|
- console.log('this.subscriptions: ', this.subscriptions)
|
|
|
105
|
+
|
|
107
|
106
|
// step 3: subscribe to the this.subscriptions array
|
|
|
107
|
+ console.log('this.subscriptions: ', this.subscriptions)
|
|
|
108
|
+
|
|
108
|
109
|
this._listenFor({ listeners: this.listeners })
|
|
109
|
110
|
this._subscribe(this.subscriptions)
|
|
110
|
111
|
}
|
|
|
@@ -134,12 +135,14 @@ class Chatter {
|
|
134
|
135
|
_listenFor({ listeners }) {
|
|
135
|
136
|
providerMethods['listen'](listeners)
|
|
136
|
137
|
}
|
|
137
|
|
-
|
|
|
138
|
+
|
|
|
139
|
+ // step 2: build the this.subscriptions array from the this.groupings object
|
|
138
|
140
|
// fetch all groupings for this profile and then store them in the chatter groupings object for reference
|
|
139
|
141
|
async getGroupingsByProfileId(profileId) {
|
|
140
|
142
|
console.log('fetching groupings for profileId:', profileId)
|
|
141
|
143
|
const groupings = await fetchMembershipsByProfileId(profileId)
|
|
142
|
144
|
this.groupings = groupings
|
|
|
145
|
+
|
|
143
|
146
|
this.createChannelNamesByGroupings(this.groupings)
|
|
144
|
147
|
}
|
|
145
|
148
|
// building a list of channel names from the groupings object.grouping_name
|