# HG changeset patch # User Kim Alvefur # Date 1490901134 -7200 # Node ID 96eabf8591a63baa88fca0ec1db41a0d9cef1632 # Parent 20ebfa4ad7f48505e529878ec4c5872a6b21aed7 mod_query_client_ver: Handle IQ errors (see #876) diff -r 20ebfa4ad7f4 -r 96eabf8591a6 mod_query_client_ver/mod_query_client_ver.lua --- a/mod_query_client_ver/mod_query_client_ver.lua Thu Mar 30 21:04:40 2017 +0200 +++ b/mod_query_client_ver/mod_query_client_ver.lua Thu Mar 30 21:12:14 2017 +0200 @@ -30,9 +30,13 @@ client = client .. " version " .. version; end origin.log("info", "Running %s", client); - return true; end end + return true; +end); + +module:hook("iq-error/host/"..version_id, function(event) + local origin, stanza = event.origin, event.stanza; origin.send(st.iq({ id = disco_id, type = "get", from = module.host, to = origin.full_jid }):query(xmlns_disco_info)); return true; end); @@ -46,7 +50,9 @@ origin.log("info", "Running %s", ident.attr.name); end end - -- Unknown software return true; end); +module:hook("iq-error/host/"..disco_id, function() + return true; -- Doesn't reply to disco#info? Weird, but ignore for now. +end);