Mercurial > prosody-modules
comparison mod_s2s_keepalive/mod_s2s_keepalive.lua @ 4628:15c4eabdcea0
mod_s2s_keepalive: Fix identification of replies (error-replies included)
Typo? This condition is supposed to filter out get and set (and anything
else), not errors, which can still mean that there's connectivity, just
no handling of XEP-0199.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 21 Jul 2021 15:52:12 +0200 |
parents | edde5905744a |
children | 0e60ce83205c |
comparison
equal
deleted
inserted
replaced
4627:adda872fa9e1 | 4628:15c4eabdcea0 |
---|---|
62 end); | 62 end); |
63 end); | 63 end); |
64 | 64 |
65 module:hook("iq/host", function (event) | 65 module:hook("iq/host", function (event) |
66 local stanza = event.stanza; | 66 local stanza = event.stanza; |
67 if stanza.attr.type ~= "result" and stanza.attr.type == "error" then | 67 if stanza.attr.type ~= "result" and stanza.attr.type ~= "error" then |
68 return -- not a reply iq stanza | 68 return -- not a reply iq stanza |
69 end | 69 end |
70 if not (stanza.attr.id and stanza.attr.id:sub(1, #"keepalive:") == "keepalive:") then | 70 if not (stanza.attr.id and stanza.attr.id:sub(1, #"keepalive:") == "keepalive:") then |
71 return -- not a reply to this module | 71 return -- not a reply to this module |
72 end | 72 end |