diff options
author | Kim Alvefur <zash@zash.se> | 2023-07-21 17:23:00 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-07-21 17:23:00 +0200 |
commit | 99cca59d6e53584e8e72e64af4b205f9802bec07 (patch) | |
tree | 9a73bfe95f60446e0d270ee95273070521d0de12 /plugins/mod_mam | |
parent | 91d95d4c334ed24c4a1aaa8308c89b0b7359f99b (diff) | |
download | prosody-99cca59d6e53584e8e72e64af4b205f9802bec07.tar.gz prosody-99cca59d6e53584e8e72e64af4b205f9802bec07.zip |
plugins: Handle how get_option_period returns "never"
Diffstat (limited to 'plugins/mod_mam')
-rw-r--r-- | plugins/mod_mam/mod_mam.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua index eb796f71..d8555ec1 100644 --- a/plugins/mod_mam/mod_mam.lua +++ b/plugins/mod_mam/mod_mam.lua @@ -441,7 +441,7 @@ local function message_handler(event, c2s) local time = time_now(); local ok, err = archive:append(store_user, nil, clone_for_storage, time, with); if not ok and err == "quota-limit" then - if type(cleanup_after) == "number" then + if cleanup_after ~= math.huge then module:log("debug", "User '%s' over quota, cleaning archive", store_user); local cleaned = archive:delete(store_user, { ["end"] = (os.time() - cleanup_after); @@ -506,7 +506,7 @@ module:hook("message/offline/broadcast", function (event) end end); -if cleanup_after ~= "never" then +if cleanup_after ~= math.huge then local cleanup_storage = module:open_store("archive_cleanup"); local cleanup_map = module:open_store("archive_cleanup", "map"); |