Created
July 19, 2020 01:45
-
-
Save sarahbanas/ca602c20673354b2ca01ba3201025a55 to your computer and use it in GitHub Desktop.
Jitsi issue: when a moderator leaves, the room still exists and participants stick around. Fix: replace original USER_LEFT (around line 1988) with the function below. It will kick all users out and leave/disconnect the room.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
room.on(JitsiConferenceEvents.USER_LEFT, (id, user) => { | |
// The logic shared between RN and web. | |
commonUserLeftHandling(APP.store, room, user); | |
// if user is a moderator, kick everyone out | |
if(user.isModerator) { | |
let participants = APP.conference.listMembers(); | |
participants.forEach(participant => { | |
APP.store.dispatch(kickedOut(room, participant)); | |
this.leaveRoomAndDisconnect(); | |
}); | |
this.leaveRoomAndDisconnect(); | |
} | |
if (user.isHidden()) { | |
return; | |
} | |
logger.log(`USER ${id} LEFT:`, user); | |
APP.UI.onSharedVideoStop(id); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment