Преглед на файлове

Merge branch 'siimee-t-54-env' of fyindr/siimee into dev

tags/0.0.1^2
maeda преди 3 години
родител
ревизия
19271dda05
променени са 1 файла, в които са добавени 6 реда и са изтрити 7 реда
  1. 6
    7
      frontend/src/services/chat.service.js

+ 6
- 7
frontend/src/services/chat.service.js Целия файл

@@ -14,13 +14,13 @@ const providerMethods = {
14 14
     listen: () => console.error('no provider listen method set'),
15 15
 }
16 16
 /**
17
- * 
18
- * 
17
+ *
18
+ *
19 19
  * Breaking out as much pubnub specific flavor
20 20
  */
21 21
 const setupPubnub = async uuid => {
22
-    const publishKey = 'pub-c-73f35484-396f-47ff-b4b6-45bed079fd3b'
23
-    const subscribeKey = 'sub-c-6cb7f5d0-94e2-11ec-b249-a68c05a281ab'
22
+    const publishKey = import.meta.env.VITE_PUBNUB_PUBLISH_KEY
23
+    const subscribeKey = import.meta.env.VITE_PUBNUB_SUBSCRIBE_KEY
24 24
     if (!uuid) return console.error('no pubnub uuid set')
25 25
 
26 26
     const pubnubClient = await new PubNub({
@@ -97,9 +97,9 @@ class Chatter {
97 97
      */
98 98
     async publish(channel, message) {
99 99
         // console.log('publishing message to channel:', channel)
100
-        return providerMethods.publish({ 
100
+        return providerMethods.publish({
101 101
             channel,
102
-            message: new ChatMessage(message)
102
+            message: new ChatMessage(message),
103 103
         })
104 104
     }
105 105
     /**
@@ -128,7 +128,6 @@ class Chatter {
128 128
         this.subscriptions = [MAIN_CHANNEL]
129 129
         console.warn('chatter stop no implemented')
130 130
     }
131
-
132 131
 }
133 132
 
134 133
 export { Chatter }

Loading…
Отказ
Запис