anear-js-api 0.4.27 → 0.4.29
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.
|
@@ -910,8 +910,8 @@ const AnearEventMachineFunctions = ({
|
|
|
910
910
|
},
|
|
911
911
|
fetchParticipantData: async (context, event) => {
|
|
912
912
|
// event.data => {id: <participantId>, geoLocation: {}}
|
|
913
|
-
const participantJSON = await AnearApi.getEventParticipantJson(event.id)
|
|
914
|
-
const anearParticipant = new AnearParticipant(participantJSON, event.geoLocation)
|
|
913
|
+
const participantJSON = await AnearApi.getEventParticipantJson(event.data.id)
|
|
914
|
+
const anearParticipant = new AnearParticipant(participantJSON, event.data.geoLocation)
|
|
915
915
|
|
|
916
916
|
return {
|
|
917
917
|
anearParticipant
|
|
@@ -937,7 +937,7 @@ const AnearEventMachineFunctions = ({
|
|
|
937
937
|
}
|
|
938
938
|
},
|
|
939
939
|
guards: {
|
|
940
|
-
participantExists: (context, event) => !!context.participants[event.id],
|
|
940
|
+
participantExists: (context, event) => !!context.participants[event.data.id],
|
|
941
941
|
eventCreatorIsHost: (context, event) => context.anearEvent.hosted
|
|
942
942
|
}
|
|
943
943
|
})
|
|
@@ -55,8 +55,9 @@ class RealtimeMessaging {
|
|
|
55
55
|
channel.presence.subscribe(
|
|
56
56
|
action,
|
|
57
57
|
member => {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
const { data } = member
|
|
59
|
+
logger.debug(`sending machine event: rcvd presence ${eventName} from ${data.id} on ${channel.name}`)
|
|
60
|
+
actor.send(eventName, { data })
|
|
60
61
|
}
|
|
61
62
|
)
|
|
62
63
|
}
|