aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_muc_mam.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_muc_mam.lua')
-rw-r--r--plugins/mod_muc_mam.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua
index 2e26893a..fee75e33 100644
--- a/plugins/mod_muc_mam.lua
+++ b/plugins/mod_muc_mam.lua
@@ -405,6 +405,8 @@ local function save_to_history(self, stanza)
if id then
schedule_cleanup(room_node);
stanza:add_direct_child(st.stanza("stanza-id", { xmlns = xmlns_st_id, by = self.jid, id = id }));
+ else
+ module:log("error", "Could not archive stanza: %s", err);
end
end
@@ -504,6 +506,9 @@ if cleanup_after ~= "never" then
if ok then
num_rooms = num_rooms + 1;
sum = sum + (tonumber(ok) or 0);
+ else
+ cleanup_map:set(cut_off, room, true);
+ module:log("error", "Could not delete messages for room '%s': %s", room, err);
end
end
module:log("info", "Deleted %d expired messages for %d rooms", sum, num_rooms);