Software /
code /
prosody
Diff
plugins/mod_version.lua @ 9227:c0e058633d9a
mod_version: Simplify iq handling by hooking on iq-get/ instead of iq/.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 24 Aug 2018 20:35:33 +0200 |
parent | 7977:01d6298de991 |
child | 9229:1338b84c0566 |
line wrap: on
line diff
--- a/plugins/mod_version.lua Fri Aug 24 20:35:17 2018 +0200 +++ b/plugins/mod_version.lua Fri Aug 24 20:35:33 2018 +0200 @@ -39,9 +39,9 @@ end end -module:hook("iq/host/jabber:iq:version:query", function(event) +module:hook("iq-get/host/jabber:iq:version:query", function(event) local stanza = event.stanza; - if stanza.attr.type == "get" and stanza.attr.to == module.host then + if stanza.attr.to == module.host then event.origin.send(st.reply(stanza):add_child(query)); return true; end