anear-js-api 0.3.34 → 0.3.35

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.
@@ -142,7 +142,7 @@ class AnearMessaging {
142
142
  let loadedEvent = anearEvent
143
143
 
144
144
  if (!eventExists) {
145
- await anearEvent.runExclusive("createEventCallback", async () => {
145
+ await anearEvent.runExclusive(`createEventCallback ${anearEvent.id}`, async () => {
146
146
  await anearEvent.createdEventCallback()
147
147
  await anearEvent.persist()
148
148
  // start the state machine before initialiing Realtime Messaging
@@ -346,7 +346,7 @@ class AnearMessaging {
346
346
  participant.context = persistedAnearParticipant.context
347
347
  }
348
348
 
349
- await anearEvent.runExclusive("participantEnterCallback", async () => {
349
+ await anearEvent.runExclusive(`participantEnterCallback ${participant.id}`, async () => {
350
350
  participant.geoLocation = geoLocation
351
351
 
352
352
  await this.setupPrivatePublishingChannel(participant)
@@ -400,7 +400,7 @@ class AnearMessaging {
400
400
 
401
401
  await this.detachParticipantPrivateChannel(anearEvent.id, participant)
402
402
 
403
- await anearEvent.runExclusive("closeParticipant", async () => {
403
+ await anearEvent.runExclusive(`closeParticipant ${participant.id}`, async () => {
404
404
  if (callback) {
405
405
  await callback(anearEvent, participant)
406
406
  }
@@ -441,7 +441,7 @@ class AnearMessaging {
441
441
  const actionJSON = JSON.parse(payload)
442
442
  const [actionEventName, actionPayload] = Object.entries(actionJSON)[0]
443
443
 
444
- await anearEvent.runExclusive("participantActionCallback", async () => {
444
+ await anearEvent.runExclusive(`participantActionCallback ${participant.id}`, async () => {
445
445
  await anearEvent.participantAction(participant, actionEventName, actionPayload)
446
446
  await anearEvent.update()
447
447
  await participant.update()
@@ -1,4 +1,5 @@
1
1
  "use strict"
2
+
2
3
  const JsonApiResource = require('./JsonApiResource')
3
4
  const ParticipantTimer = require('../utils/ParticipantTimer')
4
5
  const logger = require('../utils/Logger')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anear-js-api",
3
- "version": "0.3.34",
3
+ "version": "0.3.35",
4
4
  "description": "Javascript Developer API for Anear Apps",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {