Community Modules


changeset 06e07b483805

mod_smacks: Convert max number into a string before inserting it into a stanza.

author
Emmanuel Gil Peyrot
date
parents
children
files

1 files changed, 1 insertions(+), 1 deletions(-)

↓ Download patch

--- a/mod_smacks/mod_smacks.lua	Fri Jun 08 17:39:43 2018 +0200
+++ b/mod_smacks/mod_smacks.lua	Fri Jun 08 17:56:54 2018 +0200
@@ -279,7 +279,7 @@
 		session_registry.set(session.username, resume_token, session);
 		session.resumption_token = resume_token;
 	end
-	(session.sends2s or session.send)(st.stanza("enabled", { xmlns = xmlns_sm, id = resume_token, resume = resume, max = resume_timeout }));
+	(session.sends2s or session.send)(st.stanza("enabled", { xmlns = xmlns_sm, id = resume_token, resume = resume, max = tostring(resume_timeout) }));
 	return true;
 end
 module:hook_stanza(xmlns_sm2, "enable", function (session, stanza) return handle_enable(session, stanza, xmlns_sm2); end, 100);