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
- await this.subscribePresenceEventWithHistory(
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anear-js-api",
3
- "version": "0.3.18",
3
+ "version": "0.3.19",
4
4
  "description": "Javascript Developer API for Anear Apps",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {