Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 7363:14170d161b39
MUC: Assign occupants unavailable presence on room destruction, fixes destruction notification
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 18 Apr 2016 16:51:09 +0200 |
parent | 7362:032fcb7b80a1 |
child | 7364:9ea3094b1fca |
comparison
equal
deleted
inserted
replaced
7362:032fcb7b80a1 | 7363:14170d161b39 |
---|---|
725 occupant.role = nil; | 725 occupant.role = nil; |
726 self:save_occupant(occupant); | 726 self:save_occupant(occupant); |
727 occupants_updated[occupant] = true; | 727 occupants_updated[occupant] = true; |
728 end | 728 end |
729 for occupant in pairs(occupants_updated) do | 729 for occupant in pairs(occupants_updated) do |
730 occupant:set_session(occupant.jid, st.presence({type="unavailable"}), true); | |
730 self:publicise_occupant_status(occupant, x); | 731 self:publicise_occupant_status(occupant, x); |
731 module:fire_event("muc-occupant-left", { room = self; nick = occupant.nick; occupant = occupant;}); | 732 module:fire_event("muc-occupant-left", { room = self; nick = occupant.nick; occupant = occupant;}); |
732 end | 733 end |
733 end | 734 end |
734 | 735 |