Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(rn,external_api) skip participant notifications when not in a meeting

Saúl Ibarra Corretgé8db6e783f1f1
diff --git a/react/features/mobile/external-api/middleware.js b/react/features/mobile/external-api/middleware.js
index 2e8ff42a14..9be42195ca 100644
--- a/react/features/mobile/external-api/middleware.js
+++ b/react/features/mobile/external-api/middleware.js
@@ -189,20 +189,20 @@ MiddlewareRegistry.register(store => next => action => {
case PARTICIPANT_JOINED:
case PARTICIPANT_LEFT: {
+ // Skip these events while not in a conference. SDK users can still retrieve them.
+ const { conference } = store.getState()['features/base/conference'];
+
+ if (!conference) {
+ break;
+ }
+
const { participant } = action;
sendEvent(
store,
action.type,
- /* data */ {
- isLocal: participant.local,
- email: participant.email,
- name: participant.name,
- participantId: participant.id,
- displayName: participant.displayName,
- avatarUrl: participant.avatarURL,
- role: participant.role
- });
+ _participantToParticipantInfo(participant) /* data */
+ );
break;
}