Moderator setting logic in jicofo or prosody

I have jitsi running in private server with secure domain (plain text pass) and reservation system. through reservation system, I can allow only one predetermined user as the meeting creator so that other authenticated (who has registered id/pass) users cant create thosse scheduled meeting than the predetrmined one.

But I don’t want other authenticated user to become moderator (mute/kick power) too automatically after room creation.I want that, in a meeting, new moderator power can only be given by present moderator. Presently we tried to implement this in conference.js ,by altering the " JitsiConferenceEvents.USER_ROLE_CHANGED" event logic but it lead to some unexpected corner cases and it is not sustainable too… I saw I have to alter jicofo code but where? can I do this using prosody module as it would be more integration fiendly separate module from core?
Thanx in advance :heartbeat:

just a ping. I just want to prevent other authenticated user to become moderator other than only the authenticated creator of the room and only he can grant other moderator permission. can I do it using prosody module or I have to write in jicofo?
Thanks in advance :heartbeat:

This is all in jicofo.

If you take a look at allowners module it has a logic all jwt authenticated users to be the only moderators in a tenant or room.

can I hook the “become moderator” event and then check whether he is the creator or he granted permission and prevent firing “ROLE_CHANGED” event from prosody module?
and I am not using jwt, I am using internal_plain authentication.
sorry if I got it wrong…!

in this mod_muc_allowners.lua file can I set “false” to
joining_moderator_participants[occupant.bare_jid]” after checking from saved storage that whether he is not the creator of the room or not & will it do what I am wanting?
or, it wont be able to prevent this user’s later “login and become moderator” thing and have impact on “grants moderator permission by real moderator” ?

You can disable auto moderator in jicofo and create your own custom module, listening for occupant joined, checking some database or something(your logic here) and granting moderator rights with this method jitsi-meet/mod_muc_allowners.lua at f560eecfa9766c767c9856bd2e951cc5e17e58c1 · jitsi/jitsi-meet · GitHub

So you are saying, even if I change/apply my logic there (in mod_muc_allowners.lua) but it wont work properly if I don’t touch jicofo?
so I have to apply my logic here (in mod_muc_allowners as I understand what is happening here) but can you point me out in jicofo? I was just thinking like as jicofo gets the “become moderator” info from prosody, then why dont I just cut the line here in prosody and dont even pass the info of being moderator? or jicofo is able to permit modertor permission independent of prosody?
sorry if my question seems stupid, I just want to be clear here and implement this as it is really causing us problems… :sleepy:

What I was saying about jicofo is flipping this flag jicofo/reference.conf at f49237eb7146ce4cdb3c5b416f82afd219e4c70e · jitsi/jicofo · GitHub

Jicofo by default makes the first to join moderator. Flipping that flag, you will disable that and then you can control it all from your custom module.

oh so by this “enable auto owner” flag, jicofo is making the first one to become moderator and if he leaves then the next one? so currently with reservation module only the first one is moderator (and others with bare JID wont become moderator instantly but can become later?)
** I didn’t understand the “next in line” thing. does this mean the next one with bare JID?

// Whether to automatically grant the 'owner' role to the first participant in the conference (and subsequently to
    // the next in line when the current owner leaves).


A moderator can always grant moderation.

Which line, I got lost?

I meant when the first person in conference leaves, jicofo gives moderator permission to “next one”, here the next one is anyone or only with bare JID?
in present version with reservation module working, after moderator creates the room and become moderator… everyone with bare JID become moderator too automatically or they can become later but have the power?

The next one in line, the next participant from the list, the second to join in the meeting.

If there is allowners module enabled all will be moderators.

1 Like

Thanx a lot for the helps…!!
So I can change the “become moderator” logic from “muc_allowners” and then disable the auto moderator give in jicofo…!
so now won’t this affect the allowing present moderator to permit other moderator permission and where this got handled…?
Edit : and jicofo is the supreme owner of a room and it can give anyone moderator permission whether he has bare JID or not or whatever,right? so to change any logic depending on this I must have to touch jicofo?
and I can also give anyone/everyone moderator permission just by calling “room:set_affiliation(true, occupant.bare jid, “owner”)” ? what if I wanna give moderator permission to someone without having bare JID?




This is the only way to recognize users if those are using username and password.

hey, you said i had to disable auto moderator setting logic in jicofo as it make the first one the moderator and only if he leaves then the next one. does this apply too to secure domain with reservation module?

as I just checked our installation ( align with jisti-meet_5765 with secure domain and reservation module) and first one joining become moderator by default. But anyone even with bare jid doesn’t become moderator too. even when the creator leaves no one (the next in line with bare jid) become moderator and after the rejoining of the creator he doesn’t also become moderator rather join as normal participant?
why is this happening as by this behaviour it is not even following muc_allowners module rules neither jicofo default ??
Thanx in advance :heartbeat:

Depends on your implementation … if you don’t want that behaviour and want to control it from a module of yours, disable it …

I think that is by design …

I don’t get this, allowners will set everyone moderator and it has no knowledge of secure domain or reservation …

in muc_allowners module it make everyone in the conference moderator but I don’t want it to be everyone, can I set any logic here?
I mean how can I get the credentials the occupant used to login and joined that room? I already have data in mysql which userID is moderator in which room so I just want to hook a occupant-pre-join or occupant-joined event and make that specific user only a moderator for that room. Can I do that?

edit : as I am using reservation module, only the creator (specified by data) becomes moderator and no one becomes moderator next unless granting. but if the creator leaves there is no chance to become moderator later. I just one that creator userID to become moderator again whenever he joins later in that conference.
Thanx in advance :heart:

Check occupant.jid

I logged occupant.jid but it seemed that something like not the actual jid like past implementation.
I expected
It should be extracted by default from cache which was happening before?