Software /
code /
prosody-modules
Changeset
2671:80b6c63cb559
mod_pinger: Fix hardcoded smacks namespace, fixes #712
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Thu, 06 Apr 2017 02:31:16 +0200 |
parents | 2670:6e01878103c0 |
children | 2672:75ab061069aa |
files | mod_pinger/mod_pinger.lua |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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);