anear-js-api 0.3.18 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,8 +18,6 @@ const PRESENCE_ENTER = 'enter'
|
|
|
18
18
|
const PRESENCE_LEAVE = 'leave'
|
|
19
19
|
const ALREADY_PRESENT = 'present'
|
|
20
20
|
|
|
21
|
-
// any channel messages sent with 5 secs (5s) of initial attach will be delivered
|
|
22
|
-
// to the subscribers
|
|
23
21
|
const ChannelParams = {params: {rewind: "5s"}}
|
|
24
22
|
|
|
25
23
|
|
|
@@ -316,11 +314,16 @@ class AnearMessaging {
|
|
|
316
314
|
|
|
317
315
|
await this.attachChannel(actionsChannel)
|
|
318
316
|
|
|
319
|
-
|
|
317
|
+
this.subscribePresenceEvent(
|
|
320
318
|
actionsChannel,
|
|
321
319
|
PRESENCE_ENTER,
|
|
322
320
|
async message => await this.participantEnterMessagingCallback(anearEvent, message)
|
|
323
321
|
)
|
|
322
|
+
this.subscribePresenceEvent(
|
|
323
|
+
actionsChannel,
|
|
324
|
+
ALREADY_PRESENT,
|
|
325
|
+
async message => await this.participantEnterMessagingCallback(anearEvent, message)
|
|
326
|
+
)
|
|
324
327
|
this.subscribeEventMessages(
|
|
325
328
|
actionsChannel,
|
|
326
329
|
ActionMessageType,
|