Software / code / prosody
Comparison
plugins/muc/mod_muc.lua @ 6768:7816923fd5bf
mod_muc: Fix a traceback when an owner joins a room
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
|---|---|
| date | Sat, 25 Jul 2015 15:49:00 +0100 |
| parent | 6745:6728ad041761 |
| child | 6770:cb84731b2dfd |
comparison
equal
deleted
inserted
replaced
| 6767:d01c29b62b16 | 6768:7816923fd5bf |
|---|---|
| 36 if is_admin(jid) then return "owner"; end | 36 if is_admin(jid) then return "owner"; end |
| 37 return _get_affiliation(self, jid); | 37 return _get_affiliation(self, jid); |
| 38 end | 38 end |
| 39 | 39 |
| 40 local _set_affiliation = room_mt.set_affiliation; | 40 local _set_affiliation = room_mt.set_affiliation; |
| 41 function room_mt:set_affiliation(actor, jid, ...) | 41 function room_mt:set_affiliation(actor, jid, affiliation, reason) |
| 42 if affiliation ~= "owner" and is_admin(jid) then return nil, "modify", "not-acceptable"; end | 42 if affiliation ~= "owner" and is_admin(jid) then return nil, "modify", "not-acceptable"; end |
| 43 return _set_affiliation(self, actor, jid, ...); | 43 return _set_affiliation(self, actor, jid, affiliation, reason); |
| 44 end | 44 end |
| 45 end | 45 end |
| 46 | 46 |
| 47 local persistent = module:require "muc/persistent"; | 47 local persistent = module:require "muc/persistent"; |
| 48 local persistent_rooms_storage = module:open_store("persistent"); | 48 local persistent_rooms_storage = module:open_store("persistent"); |