Software / code / prosody-modules
Comparison
mod_auto_answer_disco_info/mod_auto_answer_disco_info.lua @ 4585:05c74210c007
mod_auto_answer_disco_info: Fix to use event that is fired
There are no iq-type/full/xmlns:name events
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 12 Jun 2021 14:47:06 +0200 |
| parent | 3268:4cdd1ddae72c |
comparison
equal
deleted
inserted
replaced
| 4584:f6f28ceff53a | 4585:05c74210c007 |
|---|---|
| 22 module:send(iq); | 22 module:send(iq); |
| 23 return true; | 23 return true; |
| 24 end | 24 end |
| 25 end | 25 end |
| 26 | 26 |
| 27 module:hook("iq-get/full/http://jabber.org/protocol/disco#info:query", disco_handler, 1); | 27 module:hook("iq/full", function(event) |
| 28 local stanza = event.stanza; | |
| 29 if stanza.attr.type == "get" then | |
| 30 if stanza:get_child("query", "http://jabber.org/protocol/disco#info") then | |
| 31 return disco_handler(event); | |
| 32 end | |
| 33 end | |
| 34 end, 1); |