Diff

plugins/mod_mam/mod_mam.lua @ 10524:7c29a6e652d2 0.11

mod_mam: Log error when unable to delete old messages (fix #1479) [luacheck]
author Kim Alvefur <zash@zash.se>
date Tue, 24 Dec 2019 00:27:41 +0100
parent 10523:86422db90e02
child 10525:9cf7d9761ca2
line wrap: on
line diff
--- a/plugins/mod_mam/mod_mam.lua	Mon Dec 23 23:18:39 2019 +0100
+++ b/plugins/mod_mam/mod_mam.lua	Tue Dec 24 00:27:41 2019 +0100
@@ -387,6 +387,8 @@
 			if ok then
 				num_users = num_users + 1;
 				sum = sum + (tonumber(ok) or 0);
+			else
+				module:log("error", "Could not delete messages for user '%s': %s", user, err);
 			end
 		end
 		module:log("info", "Deleted %d expired messages for %d users", sum, num_users);