MUC: Allow an admin to recreate destroyed rooms
authorKim Alvefur <zash@zash.se>
Wed, 11 Jul 2018 03:38:01 +0200
changeset 9019 946ae1181c57
parent 9018 dc606dc89f44
child 9020 1184f5762592
MUC: Allow an admin to recreate destroyed rooms
plugins/muc/mod_muc.lua
--- a/plugins/muc/mod_muc.lua	Wed Jul 11 03:37:57 2018 +0200
+++ b/plugins/muc/mod_muc.lua	Wed Jul 11 03:38:01 2018 +0200
@@ -398,8 +398,8 @@
 
 		if room and room._data.destroyed then
 			if stanza.attr.type == nil and stanza.name == "presence" then
-				if room._data.locked < os.time() then
-					-- Allow the room to be recreated after time has passed
+				if is_admin(stanza.attr.from) or room._data.locked < os.time() then
+					-- Allow the room to be recreated by admin or after time has passed
 					delete_room(room);
 					room = nil;
 				else