Changeset

9016:946ae1181c57

MUC: Allow an admin to recreate destroyed rooms
author Kim Alvefur <zash@zash.se>
date Wed, 11 Jul 2018 03:38:01 +0200
parents 9015:dc606dc89f44
children 9017:1184f5762592
files plugins/muc/mod_muc.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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