Diff

mod_mam/mod_mam.lua @ 2019:7198c129657c

mod_mam: Always convert 'total' to a number
author Kim Alvefur <zash@zash.se>
date Tue, 19 Jan 2016 14:33:02 +0100
parent 2018:13f46d9e526f
child 2020:37b30f10fbba
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua	Tue Jan 19 13:49:59 2016 +0100
+++ b/mod_mam/mod_mam.lua	Tue Jan 19 14:33:02 2016 +0100
@@ -142,7 +142,7 @@
 		origin.send(st.error_reply(stanza, "cancel", "internal-server-error", err));
 		return true;
 	end
-	local total = err;
+	local total = tonumber(err);
 
 	origin.send(st.reply(stanza));
 	local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to };