Software /
code /
prosody
Diff
plugins/muc/mod_muc.lua @ 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 |
parent | 9015:dc606dc89f44 |
child | 9018:73320e33762d |
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