aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/mod_muc.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-07-10 21:10:12 +0200
committerKim Alvefur <zash@zash.se>2018-07-10 21:10:12 +0200
commit6e344686b5774ab3d8aef40fb2a5f6987a5f0ad0 (patch)
treeb608965741f9422c396a5e4be447cf5dd9f87c4c /plugins/muc/mod_muc.lua
parent830370ad911628088c5cee4b3c803e63ec3b1188 (diff)
downloadprosody-6e344686b5774ab3d8aef40fb2a5f6987a5f0ad0.tar.gz
prosody-6e344686b5774ab3d8aef40fb2a5f6987a5f0ad0.zip
MUC: Flag rooms being destroyed (fixes #887)
Diffstat (limited to 'plugins/muc/mod_muc.lua')
-rw-r--r--plugins/muc/mod_muc.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index a260823d..ad937bc4 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -156,6 +156,7 @@ end);
-- Automatically destroy empty non-persistent rooms
module:hook("muc-occupant-left",function(event)
local room = event.room
+ if room.destroying then return end
if not room:has_occupant() and not persistent.get(room) then -- empty, non-persistent room
module:fire_event("muc-room-destroyed", { room = room });
end