"Fossies" - the Fresh Open Source Software Archive 
Member "jitsi-meet-7328/resources/prosody-plugins/muc_owner_allow_kick-0.12.patch" (8 Jun 2023, 1105 Bytes) of package /linux/misc/jitsi-meet-7328.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 @@ -1582,16 +1582,16 @@
4 if event.allowed ~= nil then
5 return event.allowed, event.error, event.condition;
6 end
7 + local occupant_affiliation = self:get_affiliation(occupant.bare_jid);
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 + local actor_affiliation = self:get_affiliation(actor);
13 + if (occupant_affiliation == "owner" and actor_affiliation ~= "owner") or (occupant_affiliation == "admin" and actor_affiliation ~= "admin" and actor_affiliation ~= "owner") then
14 return nil, "cancel", "not-allowed";
15 end
16
17 -- If you are trying to give or take moderator role you need to be an owner or admin
18 if occupant.role == "moderator" or role == "moderator" then
19 - local actor_affiliation = self:get_affiliation(actor);
20 if actor_affiliation ~= "owner" and actor_affiliation ~= "admin" then
21 return nil, "cancel", "not-allowed";
22 end