fix(filmstrip) prevent duplicated participants

This commit is contained in:
Saúl Ibarra Corretgé 2022-10-18 12:09:04 +02:00 committed by Saúl Ibarra Corretgé
parent 2938d1f2dc
commit 4bb1697115
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ export function updateRemoteParticipants(store: Object, participantId: ?number)
const { remoteParticipants } = state['features/filmstrip'];
reorderedParticipants = [ ...remoteParticipants, participantId ];
store.dispatch(setRemoteParticipants(reorderedParticipants));
store.dispatch(setRemoteParticipants(Array.from(new Set(reorderedParticipants))));
}
return;
@ -92,7 +92,7 @@ export function updateRemoteParticipants(store: Object, participantId: ?number)
];
}
store.dispatch(setRemoteParticipants(reorderedParticipants));
store.dispatch(setRemoteParticipants(Array.from(new Set(reorderedParticipants))));
}
/**