diff plugins/muc/mod_muc.lua @ 9007:695904638cfa

MUC: Flag rooms being destroyed (fixes #887)
author Kim Alvefur <zash@zash.se>
date Tue, 10 Jul 2018 21:10:12 +0200
parents f4030a506d6b
children 3c5ddd53fe50
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Tue Jul 10 00:52:46 2018 +0200
+++ b/plugins/muc/mod_muc.lua	Tue Jul 10 21:10:12 2018 +0200
@@ -156,6 +156,7 @@
 -- 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