anear-js-api 0.4.2 → 0.4.3

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.
@@ -85,6 +85,10 @@ class AnearMessaging {
85
85
  return await this.AnearEventClass.getFromStorage(eventId, this)
86
86
  }
87
87
 
88
+ async getAnearParticipantFromStorage(participantId) {
89
+ return await this.AnearParticipantClass.getFromStorage(participantId, this)
90
+ }
91
+
88
92
  async initEventRealtimeMessaging(anearEvent) {
89
93
 
90
94
  if (this.eventChannels.hasOwnProperty(anearEvent.id)) {
@@ -311,10 +311,9 @@ class AnearEvent extends JsonApiResource {
311
311
  return Promise.all(
312
312
  this.participants.all.map(
313
313
  async p => {
314
- const participant = await this.messaging.getAnearParticipantFromStorage(p.id)
315
314
  await this.messaging.closeParticipant(
316
315
  this,
317
- participant.id,
316
+ p.id,
318
317
  async (anearEvent, participant) => {
319
318
  await anearEvent.participantPurge(participant)
320
319
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anear-js-api",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Javascript Developer API for Anear Apps",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {