Software /
code /
prosody
Comparison
plugins/muc/mod_muc.lua @ 10646:85585910d468 0.11
mod_muc: Allow control over the server-admins-are-room-owners feature (see #1174)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 13 Feb 2020 14:27:12 +0000 |
parent | 9626:4d3ab7153153 |
child | 10647:d1bfda983ffe |
comparison
equal
deleted
inserted
replaced
10618:232841373711 | 10646:85585910d468 |
---|---|
102 | 102 |
103 local function is_admin(jid) | 103 local function is_admin(jid) |
104 return um_is_admin(jid, module.host); | 104 return um_is_admin(jid, module.host); |
105 end | 105 end |
106 | 106 |
107 do -- Monkey patch to make server admins room owners | 107 if module:get_option_boolean("component_admins_as_room_owners", true) then |
108 -- Monkey patch to make server admins room owners | |
108 local _get_affiliation = room_mt.get_affiliation; | 109 local _get_affiliation = room_mt.get_affiliation; |
109 function room_mt:get_affiliation(jid) | 110 function room_mt:get_affiliation(jid) |
110 if is_admin(jid) then return "owner"; end | 111 if is_admin(jid) then return "owner"; end |
111 return _get_affiliation(self, jid); | 112 return _get_affiliation(self, jid); |
112 end | 113 end |