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
commit42f3addb8f298f9f9d277f739d51e9b15756aa56 (patch)
tree615052ee3bdf378f3bc85cb09d85128c5c2d9ee5 /plugins/muc
parentd407be54b19fed67637fcc6f90a6f6d1249eda33 (diff)
downloadprosody-42f3addb8f298f9f9d277f739d51e9b15756aa56.tar.gz
prosody-42f3addb8f298f9f9d277f739d51e9b15756aa56.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;