Destroy room when moderator leaves


#1

I am using secure domain so only authenticated user becomes moderator but how to destroy the room when moderator leaves?? can give some direction to properly dispose the room and disconnect all the guests?


#2

I don’t think this is possible today.


#3

You can create a prosody module that can accomplish that.

In current prosody trunk there is an event muc-occupant-left and on that event if in the muc the only participant left with role owner is the focus you can destroy the room, the clients will handle that, I think. I’m just not sure how jicofo will handle that at the moment.


#4

i was thinking using like,

  1. listen to JitsiConferenceEvents.USER_LEFT
  2. check if the user left was moderator.
  3. refresh user browser if moderator left.

inspired by this function
@damencho Do you think it will work?


#5

Yes it will work. Normally those stuff are handeled on the xmpp server, but it will work that way …