aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-07-11 03:38:01 +0200
committerKim Alvefur <zash@zash.se>2018-07-11 03:38:01 +0200
commit4c2d352eccebd88cbeb309b2d26e1049ee3569c8 (patch)
tree8e1874216e547a18742c5c45fedccd5c7fd9c501 /plugins/muc
parent96146867f8e12443a90f781fbfbbcf47681a3780 (diff)
downloadprosody-4c2d352eccebd88cbeb309b2d26e1049ee3569c8.tar.gz
prosody-4c2d352eccebd88cbeb309b2d26e1049ee3569c8.zip
MUC: Allow an admin to recreate destroyed rooms
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/mod_muc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 7704adfe..cc0c675b 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -398,8 +398,8 @@ for event_name, method in pairs {
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