# HG changeset patch # User daurnimator # Date 1400692260 14400 # Node ID 10b27981ea3f101396ff5db84043910c4fd79a7b # Parent 41a5e5205fd9dd86cffe183948f1d4397a597d51 plugins/muc/muc: Only set role to nil if it's the last session to leave diff -r 41a5e5205fd9 -r 10b27981ea3f plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Mon May 19 13:47:28 2014 -0400 +++ b/plugins/muc/muc.lib.lua Wed May 21 13:11:00 2014 -0400 @@ -410,7 +410,9 @@ 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);