Software /
code /
prosody
Comparison
plugins/muc/mod_muc.lua @ 9093:04a284c5b88b
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
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 03 Aug 2018 22:25:16 +0200 |
parent | 9081:ce57c69a20e2 |
child | 9191:5192adc5c47f |
comparison
equal
deleted
inserted
replaced
9092:5110da3a71eb | 9093:04a284c5b88b |
---|---|
349 local ttl = module:get_option_number("muc_tombstone_expiry", 86400 * 31); | 349 local ttl = module:get_option_number("muc_tombstone_expiry", 86400 * 31); |
350 | 350 |
351 module:hook("muc-room-destroyed",function(event) | 351 module:hook("muc-room-destroyed",function(event) |
352 local room = event.room; | 352 local room = event.room; |
353 if not room:get_persistent() then return end | 353 if not room:get_persistent() then return end |
354 if room._data.destroyed then | |
355 return -- Allow destruction of tombstone | |
356 end | |
354 | 357 |
355 local tombstone = new_room(room.jid, { | 358 local tombstone = new_room(room.jid, { |
356 locked = os.time() + ttl; | 359 locked = os.time() + ttl; |
357 destroyed = true; | 360 destroyed = true; |
358 reason = event.reason; | 361 reason = event.reason; |