projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6924d7b
)
MUC: Fixed traceback when a JID not in a room requested a role change for an occupant.
author
Waqas Hussain
<waqas20@gmail.com>
Tue, 1 Apr 2014 14:02:58 +0000
(10:02 -0400)
committer
Waqas Hussain
<waqas20@gmail.com>
Tue, 1 Apr 2014 14:02:58 +0000
(10:02 -0400)
plugins/muc/muc.lib.lua
patch
|
blob
|
history
diff --git
a/plugins/muc/muc.lib.lua
b/plugins/muc/muc.lib.lua
index 0dbe81fae9255c17e72a28b809bfd57a61342c12..8028f5aee0e5cc9dc352930a27797cc3b2f6e246 100644
(file)
--- a/
plugins/muc/muc.lib.lua
+++ b/
plugins/muc/muc.lib.lua
@@
-1060,7
+1060,7
@@
function room_mt:can_set_role(actor_jid, occupant_jid, role)
if actor_jid == true then return true; end
local actor = self._occupants[self._jid_nick[actor_jid]];
- if actor.role == "moderator" then
+ if actor
and actor
.role == "moderator" then
if occupant.affiliation ~= "owner" and occupant.affiliation ~= "admin" then
if actor.affiliation == "owner" or actor.affiliation == "admin" then
return true;