aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2014-04-18 12:19:33 -0400
committerdaurnimator <quae@daurnimator.com>2014-04-18 12:19:33 -0400
commit544685b84c9618705ba70bb0c1a2ebb5258d67b2 (patch)
treeb86fc8d5554ce9e4abb87ec59c476c30c962f593
parent7c55b4a2e2bf8564efa21b5bf6815107d44364bc (diff)
downloadprosody-544685b84c9618705ba70bb0c1a2ebb5258d67b2.tar.gz
prosody-544685b84c9618705ba70bb0c1a2ebb5258d67b2.zip
plugins/muc/muc.lib: When user leaves; set their role to nil
-rw-r--r--plugins/muc/muc.lib.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 53f91b83..61520354 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -405,6 +405,7 @@ function room_mt:handle_presence_to_occupant(origin, stanza)
local dest_nick;
if dest_occupant == nil then -- Session is leaving
log("debug", "session %s is leaving occupant %s", real_jid, orig_occupant.nick);
+ orig_occupant.role = nil;
orig_occupant:set_session(real_jid, stanza);
else
log("debug", "session %s is changing from occupant %s to %s", real_jid, orig_occupant.nick, dest_occupant.nick);