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

This commit is contained in:
Saúl Ibarra Corretgé 2021-09-01 17:28:20 +02:00 committed by Saúl Ibarra Corretgé
parent 7b4a426ad2
commit 8db6e783f1
1 changed files with 9 additions and 9 deletions

View File

@ -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;
}