aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-03 22:25:16 +0200
committerKim Alvefur <zash@zash.se>2018-08-03 22:25:16 +0200
commit399ddd601d5e578ca89aef7754cd0001d71bc537 (patch)
tree615052ee3bdf378f3bc85cb09d85128c5c2d9ee5 /plugins/muc
parent6b55f14950f406bc1a6e61090b35037f991d35b0 (diff)
downloadprosody-399ddd601d5e578ca89aef7754cd0001d71bc537.tar.gz
prosody-399ddd601d5e578ca89aef7754cd0001d71bc537.zip
MUC: Allow destruction of tombstones (eg via telnet or adhoc command)
Otherwise this just updates the timestamp, which is probably the opposite of what the user wanted
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/mod_muc.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 58b13936..008bafde 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -351,6 +351,9 @@ if module:get_option_boolean("muc_tombstones", true) then
module:hook("muc-room-destroyed",function(event)
local room = event.room;
if not room:get_persistent() then return end
+ if room._data.destroyed then
+ return -- Allow destruction of tombstone
+ end
local tombstone = new_room(room.jid, {
locked = os.time() + ttl;