# HG changeset patch # User Kim Alvefur # Date 1505221192 -7200 # Node ID 97a094fdf101a4dd3a9347319e2280fa44c2fab9 # Parent 15485264609509979c7ae1e6d390e9934e459fae mod_mam: Log a message in case archive deletion is not supported by the storage module in use diff -r 154852646095 -r 97a094fdf101 plugins/mod_mam/mod_mam.lua --- a/plugins/mod_mam/mod_mam.lua Tue Sep 12 14:42:56 2017 +0200 +++ b/plugins/mod_mam/mod_mam.lua Tue Sep 12 14:59:52 2017 +0200 @@ -333,7 +333,9 @@ local cleanup_after = module:get_option_string("archive_expires_after", "1w"); local cleanup_interval = module:get_option_number("archive_cleanup_interval", 4 * 60 * 60); -if cleanup_after ~= "never" then +if not archive.delete then + module:log("debug", "Selected storage driver does not support deletion, archives will not expire"); +elseif cleanup_after ~= "never" then local day = 86400; local multipliers = { d = day, w = day * 7, m = 31 * day, y = 365.2425 * day }; local n, m = cleanup_after:lower():match("(%d+)%s*([dwmy]?)");