Przeglądaj źródła

:broom: removed redundant comments, console logging currentProfile.chatter.subscriptions from login service on login

tags/0.0.1^2
K Rob 3 lat temu
rodzic
commit
068098d6da
2 zmienionych plików z 4 dodań i 5 usunięć
  1. 3
    0
      frontend/src/App.vue
  2. 1
    5
      frontend/src/services/chat.service.js

+ 3
- 0
frontend/src/App.vue Wyświetl plik

72
                 currentProfile.setupToaster(this.$waveui.notify)
72
                 currentProfile.setupToaster(this.$waveui.notify)
73
             }
73
             }
74
             console.log('---')
74
             console.log('---')
75
+            //  step 3: subscribe to the this.subscriptions array
76
+            // view current subscriptions on the currentProfile.chatter.subscriptions
77
+            console.log('subscriptions', currentProfile.chatter.subscriptions)
75
         },
78
         },
76
     },
79
     },
77
 }
80
 }

+ 1
- 5
frontend/src/services/chat.service.js Wyświetl plik

23
 const setupPubnub = async uuid => {
23
 const setupPubnub = async uuid => {
24
     const publishKey = 'pub-c-73f35484-396f-47ff-b4b6-45bed079fd3b'
24
     const publishKey = 'pub-c-73f35484-396f-47ff-b4b6-45bed079fd3b'
25
     const subscribeKey = 'sub-c-6cb7f5d0-94e2-11ec-b249-a68c05a281ab'
25
     const subscribeKey = 'sub-c-6cb7f5d0-94e2-11ec-b249-a68c05a281ab'
26
-    // console.log('publishKey: ' , publishKey)
27
     if (!uuid) return console.error('no pubnub uuid set')
26
     if (!uuid) return console.error('no pubnub uuid set')
28
 
27
 
29
     const pubnubClient = await new PubNub({
28
     const pubnubClient = await new PubNub({
70
         this.uuid = null
69
         this.uuid = null
71
 
70
 
72
         // Setup the main channel
71
         // Setup the main channel
73
-        //  subscriptions array will be built dynamically from the this.groupings object
72
+        //  subscriptions array will be built dynamically from the "this.groupings" object
74
         this.subscriptions = [MAIN_CHANNEL, 'Channel-LosAngeles']
73
         this.subscriptions = [MAIN_CHANNEL, 'Channel-LosAngeles']
75
         this.listeners = {
74
         this.listeners = {
76
             status: async e => {
75
             status: async e => {
103
         //  step 1: build the this.groupings object from the backend
102
         //  step 1: build the this.groupings object from the backend
104
         this.getGroupingsByProfileId(this.uuid)
103
         this.getGroupingsByProfileId(this.uuid)
105
         
104
         
106
-        //  step 3: subscribe to the this.subscriptions array
107
-        console.log('this.subscriptions: ', this.subscriptions)
108
         
105
         
109
         this._listenFor({ listeners: this.listeners })
106
         this._listenFor({ listeners: this.listeners })
110
         this._subscribe(this.subscriptions)
107
         this._subscribe(this.subscriptions)
142
         console.log('fetching groupings for profileId:', profileId)
139
         console.log('fetching groupings for profileId:', profileId)
143
         const groupings = await fetchMembershipsByProfileId(profileId)
140
         const groupings = await fetchMembershipsByProfileId(profileId)
144
         this.groupings = groupings
141
         this.groupings = groupings
145
-       
146
         this.createChannelNamesByGroupings(this.groupings)
142
         this.createChannelNamesByGroupings(this.groupings)
147
     }
143
     }
148
     // building a list of channel names from the groupings object.grouping_name
144
     // building a list of channel names from the groupings object.grouping_name

Ładowanie…
Anuluj
Zapisz