ソースを参照

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
     listen: () => console.error('no provider listen method set'),
14
     listen: () => console.error('no provider listen method set'),
15
 }
15
 }
16
 /**
16
 /**
17
- * 
18
- * 
17
+ *
18
+ *
19
  * Breaking out as much pubnub specific flavor
19
  * Breaking out as much pubnub specific flavor
20
  */
20
  */
21
 const setupPubnub = async uuid => {
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
     if (!uuid) return console.error('no pubnub uuid set')
24
     if (!uuid) return console.error('no pubnub uuid set')
25
 
25
 
26
     const pubnubClient = await new PubNub({
26
     const pubnubClient = await new PubNub({
97
      */
97
      */
98
     async publish(channel, message) {
98
     async publish(channel, message) {
99
         // console.log('publishing message to channel:', channel)
99
         // console.log('publishing message to channel:', channel)
100
-        return providerMethods.publish({ 
100
+        return providerMethods.publish({
101
             channel,
101
             channel,
102
-            message: new ChatMessage(message)
102
+            message: new ChatMessage(message),
103
         })
103
         })
104
     }
104
     }
105
     /**
105
     /**
128
         this.subscriptions = [MAIN_CHANNEL]
128
         this.subscriptions = [MAIN_CHANNEL]
129
         console.warn('chatter stop no implemented')
129
         console.warn('chatter stop no implemented')
130
     }
130
     }
131
-
132
 }
131
 }
133
 
132
 
134
 export { Chatter }
133
 export { Chatter }

読み込み中…
キャンセル
保存