# HG changeset patch # User Kim Alvefur # Date 1623502026 -7200 # Node ID 05c74210c007a77cc0b7daab18900bb4094882b6 # Parent f6f28ceff53a302fa352ba798f3405e5218c5d7c mod_auto_answer_disco_info: Fix to use event that is fired There are no iq-type/full/xmlns:name events diff -r f6f28ceff53a -r 05c74210c007 mod_auto_answer_disco_info/mod_auto_answer_disco_info.lua --- a/mod_auto_answer_disco_info/mod_auto_answer_disco_info.lua Mon Jun 07 19:15:28 2021 +0200 +++ b/mod_auto_answer_disco_info/mod_auto_answer_disco_info.lua Sat Jun 12 14:47:06 2021 +0200 @@ -24,4 +24,11 @@ end end -module:hook("iq-get/full/http://jabber.org/protocol/disco#info:query", disco_handler, 1); +module:hook("iq/full", function(event) + local stanza = event.stanza; + if stanza.attr.type == "get" then + if stanza:get_child("query", "http://jabber.org/protocol/disco#info") then + return disco_handler(event); + end + end +end, 1);