Prosody - Kick participant out from the conference when the last moderator leaves

I’m trying to kick all the participants out from the conference when the last moderator leave. I tried several plugins. (Ex: mod_dissconnect.lua). All the plugins uses below line of code to kick a participant out.

room:set_affiliation(true, p.jid, "outcast")

However, this line of code seems only disconnecting the connection to the room. Participant does not get kicked out from the room. He is left in the room alone. Therefore, in the React meet app, KICKED_OUT event is not getting fired. Is there any new plugin for jitsi or any new way of writing this line of code? Is there a different way to fire KICKED_OUT event?

Note: I also use token_moderation.lua plugin too.

Does this version work the way you want? Jisi Prosody plugin to close room when last moderator leaves · GitHub

Disclaimer: It was something I scratched together quickly for a different post and have not really tested it, so I’m afraid I cannot offer any guarantees or much support on it.

Still this is not working. This just closes the connection to the conference and user is still in the room. No KICKED_OUT event fires. I just need to listen to the KICKED_OUT event and manually hang the user up.

Note: I also use token_moderation.lua plugin too.

@shawn Actually, Thank you very much. Instead of listening to KICKED_OUT event, I listened to CONFERENCE_DESTROYED event and hanged the call. So It works that way. Thank you very much again.

1 Like