Software /
code /
prosody
Diff
plugins/mod_mam/mod_mam.lua @ 7848:efe5232793aa
mod_mam: If archive:delete() gives a number, this should be the number of deleted items
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 22 Nov 2016 18:19:55 +0100 |
parent | 7846:22275bc5744a |
child | 7849:93a068ef4b2c |
line wrap: on
line diff
--- a/plugins/mod_mam/mod_mam.lua Tue Nov 22 18:13:21 2016 +0100 +++ b/plugins/mod_mam/mod_mam.lua Tue Nov 22 18:19:55 2016 +0100 @@ -326,11 +326,8 @@ 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