changeset 2501:04064f01df0e

mod_mam_muc: Make sure that the total, if it is a total, is a number
author Kim Alvefur <zash@zash.se>
date Tue, 14 Feb 2017 09:51:59 +0100
parents ec046f915506
children f576ac1cad65
files mod_mam_muc/mod_mam_muc.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_mam_muc/mod_mam_muc.lua	Tue Feb 14 09:51:22 2017 +0100
+++ b/mod_mam_muc/mod_mam_muc.lua	Tue Feb 14 09:51:59 2017 +0100
@@ -217,7 +217,7 @@
 		origin.send(st.error_reply(stanza, "cancel", "internal-server-error"));
 		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 };