diff options
author | daurnimator <quae@daurnimator.com> | 2014-05-21 13:11:00 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-05-21 13:11:00 -0400 |
commit | 347202819d3fd42945160856f0c409a245b4d1f1 (patch) | |
tree | b549533805416662c86889ef914adf3983ad530a /plugins | |
parent | d6b18f4e20e7ac945426acf5d869b446c61d57e0 (diff) | |
download | prosody-347202819d3fd42945160856f0c409a245b4d1f1.tar.gz prosody-347202819d3fd42945160856f0c409a245b4d1f1.zip |
plugins/muc/muc: Only set role to nil if it's the last session to leave
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/muc/muc.lib.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 5838cbe9..34934213 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -410,7 +410,9 @@ 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; + if is_last_orig_session then + orig_occupant.role = nil; + end 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); |