fix(breakout-rooms) joining room with hand raised bug

Joining a room while hand is raised caused the local raised hand total to be wrong.
This is because when the local participant id changes, the old id is not cleared from the raisedHandQueue.
This commit is contained in:
nbeck.indy
2021-12-29 17:32:40 -05:00
committed by Horatiu Muresan
parent 7aac634a7d
commit 477d47c10d

View File

@@ -84,6 +84,9 @@ ReducerRegistry.register('features/base/participants', (state = DEFAULT_STATE, a
const { local } = state;
if (local) {
if (action.newValue === 'local' && state.raisedHandsQueue.find(pid => pid.id === local.id)) {
state.raisedHandsQueue = state.raisedHandsQueue.filter(pid => pid.id !== local.id);
}
state.local = {
...local,
id: action.newValue