Mercurial > prosody-hg
comparison plugins/muc/mod_muc.lua @ 10647:d1bfda983ffe
Merge 0.11->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 13 Feb 2020 14:27:42 +0000 |
| parents | c1edeb9fe337 85585910d468 |
| children | 76bb806cdd4b |
comparison
equal
deleted
inserted
replaced
| 10645:067ada779ea5 | 10647:d1bfda983ffe |
|---|---|
| 109 | 109 |
| 110 local function is_admin(jid) | 110 local function is_admin(jid) |
| 111 return um_is_admin(jid, module.host); | 111 return um_is_admin(jid, module.host); |
| 112 end | 112 end |
| 113 | 113 |
| 114 do -- Monkey patch to make server admins room owners | 114 if module:get_option_boolean("component_admins_as_room_owners", true) then |
| 115 -- Monkey patch to make server admins room owners | |
| 115 local _get_affiliation = room_mt.get_affiliation; | 116 local _get_affiliation = room_mt.get_affiliation; |
| 116 function room_mt:get_affiliation(jid) | 117 function room_mt:get_affiliation(jid) |
| 117 if is_admin(jid) then return "owner"; end | 118 if is_admin(jid) then return "owner"; end |
| 118 return _get_affiliation(self, jid); | 119 return _get_affiliation(self, jid); |
| 119 end | 120 end |
