aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_mam/mod_mam.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua
index 2bdf85dc..9d7aabde 100644
--- a/plugins/mod_mam/mod_mam.lua
+++ b/plugins/mod_mam/mod_mam.lua
@@ -326,11 +326,8 @@ if cleanup_after ~= "never" then
local ok, err = archive:delete(user, { ["end"] = os.time() - cleanup_after; })
if not ok then
module:log("warn", "Could not expire archives for user %s: %s", user, err);
- else
- -- :affected() is a recent addition for eg SQLite3 in LuaDBI
- pcall(function(stmt)
- module:log("debug", "Removed %d messages", stmt:affected());
- end, err);
+ elseif type(ok) == "number" then
+ module:log("debug", "Removed %d messages", ok);
end
cleanup[user] = nil;
end