"Fossies" - the Fresh Open Source Software Archive 
Member "jitsi-meet-7561/resources/prosody-plugins/muc_owner_allow_kick.patch" (29 Sep 2023, 1065 Bytes) of package /linux/misc/jitsi-meet-7561.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 --- muc.lib.lua 2016-10-26 18:26:53.432377291 +0000
2 +++ muc.lib.lua 2016-10-26 18:41:40.754426072 +0000
3 @@ -1256,15 +1256,16 @@
4 if actor == true then
5 actor = nil -- So we can pass it safely to 'publicise_occupant_status' below
6 else
7 + local actor_affiliation = self:get_affiliation(actor);
8 +
9 -- Can't do anything to other owners or admins
10 local occupant_affiliation = self:get_affiliation(occupant.bare_jid);
11 - if occupant_affiliation == "owner" or occupant_affiliation == "admin" then
12 + if (occupant_affiliation == "owner" and actor_affiliation ~= "owner") or (occupant_affiliation == "admin" and actor_affiliation ~= "admin" and actor_affiliation ~= "owner") then
13 return nil, "cancel", "not-allowed";
14 end
15
16 -- If you are trying to give or take moderator role you need to be an owner or admin
17 if occupant.role == "moderator" or role == "moderator" then
18 - local actor_affiliation = self:get_affiliation(actor);
19 if actor_affiliation ~= "owner" and actor_affiliation ~= "admin" then
20 return nil, "cancel", "not-allowed";
21 end