Software / code / prosody
Changeset
6742:6efeb801d62f
Backed out changeset bea3862b6bde in favor of a different approach
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 25 Jun 2015 17:54:19 +0200 |
| parents | 6741:bea3862b6bde |
| children | 6743:adf2fdf1264a |
| files | plugins/muc/mod_muc.lua |
| diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua Tue Jun 16 15:13:47 2015 +0200 +++ b/plugins/muc/mod_muc.lua Thu Jun 25 17:54:19 2015 +0200 @@ -44,11 +44,16 @@ return um_is_admin(jid, module.host); end +local _set_affiliation = muc_new_room.room_mt.set_affiliation; local _get_affiliation = muc_new_room.room_mt.get_affiliation; function muclib.room_mt:get_affiliation(jid) if is_admin(jid) then return "owner"; end return _get_affiliation(self, jid); end +function muclib.room_mt:set_affiliation(actor, jid, affiliation, callback, reason) + if is_admin(jid) then return nil, "modify", "not-acceptable"; end + return _set_affiliation(self, actor, jid, affiliation, callback, reason); +end local function room_route_stanza(room, stanza) module:send(stanza); end local function room_save(room, forced)