-
-
Save gigabyteservice/08588114e3e2e08ac73600d861b906bd 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