# HG changeset patch # User Kim Alvefur # Date 1453210382 -3600 # Node ID 7198c129657c7552ac7826f160b4984c3b2378c0 # Parent 13f46d9e526fafbe993010df4ec6b65032367edf mod_mam: Always convert 'total' to a number diff -r 13f46d9e526f -r 7198c129657c mod_mam/mod_mam.lua --- 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 };