# HG changeset patch # User tmolitor # Date 1491438676 -7200 # Node ID 80b6c63cb55912628453f2e570908c5a9826dba4 # Parent 6e01878103c0e907759f5179db9c480d8f215117 mod_pinger: Fix hardcoded smacks namespace, fixes #712 diff -r 6e01878103c0 -r 80b6c63cb559 mod_pinger/mod_pinger.lua --- a/mod_pinger/mod_pinger.lua Thu Apr 06 02:12:14 2017 +0200 +++ b/mod_pinger/mod_pinger.lua Thu Apr 06 02:31:16 2017 +0200 @@ -15,12 +15,12 @@ local session = watchdog.session; if not session.idle_pinged then session.idle_pinged = true; - if session.smacks and not session.awaiting_ack then - session.send(st.stanza("r", { xmlns = "urn:xmpp:sm:2" })) -- TODO: hardcoded sm:2 - else - session.send(st.iq({ type = "get", from = module.host, id = "idle-check" }) - :tag("ping", { xmlns = "urn:xmpp:ping" })); - end + if session.smacks and not session.awaiting_ack then + session.send(st.stanza("r", { xmlns = session.smacks })) + else + session.send(st.iq({ type = "get", from = module.host, id = "idle-check" }) + :tag("ping", { xmlns = "urn:xmpp:ping" })); + end return ping_timeout; -- Call us again after ping_timeout else module:log("info", "Client %q silent for too long, closing...", session.full_jid);