Jitsi meet change role from participant to moderator

Hi @damencho ,
in my company we have customized jitsi meet.
Each user who login has his own meeting id (room name) and only he can create the room with that name, of which he will be the only moderator.

The rooms are started with the lobby active by default.

when the moderator leaves the room, it is killed.

However, we have difficulty in cases where the moderator has network problems … in this case he is freaked out.

I took advantage of the room password mechanism to allow the same moderator user to re-enter the room and with

APP.store.dispatch (localParticipantRoleChanged (‘moderator’));

in the conference.js, I gave him back the role of moderator but it seems to be given “apparently” since he can’t do the things the moderator does (eg kick the participants or mute them …)

So I tried to call the grantModerator dispatch but this gives me an “undefined grantOwner” error …

Do you have any suggestions on how to really change the role of a participant?

thank you so much,

You need to do that server-side when the moderator joins.

You can see when a participant enters the correct password through lobby and how that is handled in the code: jitsi-meet/mod_muc_lobby_rooms.lua at 909173cdb524aa88bcea6d55d1b163d1b7b7efa9 · jitsi/jitsi-meet · GitHub

The participant is whitelisted to join and its affiliation is set to member jitsi-meet/mod_muc_lobby_rooms.lua at 909173cdb524aa88bcea6d55d1b163d1b7b7efa9 · jitsi/jitsi-meet · GitHub

You can set it as owner like here: jitsi-meet/mod_muc_allowners.lua at 909173cdb524aa88bcea6d55d1b163d1b7b7efa9 · jitsi/jitsi-meet · GitHub

So everyone that knows the password will be a moderator.

Thanks for the prompt reply,
is there a way to prevent everyone who knows the password from becoming moderator but only who owns is moderator?

If you can distinguish those participants in lua yes.

1 Like