MUC: Assign occupants unavailable presence on room destruction, fixes destruction...
authorKim Alvefur <zash@zash.se>
Mon, 18 Apr 2016 14:51:09 +0000 (16:51 +0200)
committerKim Alvefur <zash@zash.se>
Mon, 18 Apr 2016 14:51:09 +0000 (16:51 +0200)
plugins/muc/muc.lib.lua

index 14cbd63c63e84f593f27fcac8b15c7923f7186c1..434127b4f2fd4e87ba2996284b9abfaf3fc0074a 100644 (file)
@@ -727,6 +727,7 @@ function room_mt:clear(x)
                occupants_updated[occupant] = true;
        end
        for occupant in pairs(occupants_updated) do
+               occupant:set_session(occupant.jid, st.presence({type="unavailable"}), true);
                self:publicise_occupant_status(occupant, x);
                module:fire_event("muc-occupant-left", { room = self; nick = occupant.nick; occupant = occupant;});
        end