From 59c6047e77980b89431b1d59e1458976bfb6eb18 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 18 Apr 2014 12:19:33 -0400 Subject: plugins/muc/muc.lib: When user leaves; set their role to nil --- plugins/muc/muc.lib.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/muc') 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); -- cgit v1.2.3