Software /
code /
prosody
Comparison
plugins/mod_tombstones.lua @ 12977:74b9e05af71e
plugins: Prefix module imports with prosody namespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 24 Mar 2023 13:15:28 +0100 |
parent | 12438:a698f65df453 |
child | 13209:c8d949cf6b09 |
comparison
equal
deleted
inserted
replaced
12976:a187600ec7d6 | 12977:74b9e05af71e |
---|---|
1 -- TODO warn when trying to create an user before the tombstone expires | 1 -- TODO warn when trying to create an user before the tombstone expires |
2 -- e.g. via telnet or other admin interface | 2 -- e.g. via telnet or other admin interface |
3 local datetime = require "util.datetime"; | 3 local datetime = require "prosody.util.datetime"; |
4 local errors = require "util.error"; | 4 local errors = require "prosody.util.error"; |
5 local jid_node = require"util.jid".node; | 5 local jid_node = require"prosody.util.jid".node; |
6 local st = require "util.stanza"; | 6 local st = require "prosody.util.stanza"; |
7 | 7 |
8 -- Using a map store as key-value store so that removal of all user data | 8 -- Using a map store as key-value store so that removal of all user data |
9 -- does not also remove the tombstone, which would defeat the point | 9 -- does not also remove the tombstone, which would defeat the point |
10 local graveyard = module:open_store(nil, "map"); | 10 local graveyard = module:open_store(nil, "map"); |
11 local graveyard_cache = require "util.cache".new(module:get_option_number("tombstone_cache_size", 1024)); | 11 local graveyard_cache = require "prosody.util.cache".new(module:get_option_number("tombstone_cache_size", 1024)); |
12 | 12 |
13 local ttl = module:get_option_number("user_tombstone_expiry", nil); | 13 local ttl = module:get_option_number("user_tombstone_expiry", nil); |
14 -- Keep tombstones forever by default | 14 -- Keep tombstones forever by default |
15 -- | 15 -- |
16 -- Rationale: | 16 -- Rationale: |