Diff

plugins/mod_mam/mod_mam.lua @ 9802:d725c2ab0c7d

mod_mam: Fix operator precedence (thanks mimi89999)
author Kim Alvefur <zash@zash.se>
date Sun, 20 Jan 2019 20:24:17 +0100
parent 9758:d4a534e6bd7c
child 9882:18f025b3987d
line wrap: on
line diff
--- a/plugins/mod_mam/mod_mam.lua	Sat Jan 19 21:35:16 2019 +0100
+++ b/plugins/mod_mam/mod_mam.lua	Sun Jan 20 20:24:17 2019 +0100
@@ -378,7 +378,7 @@
 			local ok, err = archive:delete(user, { ["end"] = os.time() - cleanup_after; })
 			if ok then
 				num_users = num_users + 1;
-				sum = sum + tonumber(ok) or 0;
+				sum = sum + (tonumber(ok) or 0);
 			end
 		end
 		module:log("info", "Deleted %d expired messages for %d users", sum, num_users);