plugins/muc/mod_muc.lua
changeset 9010 695904638cfa
parent 8980 f4030a506d6b
child 9013 3c5ddd53fe50
--- 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