Software /
code /
prosody
Changeset
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 |
parents | 9226:affd84be3fc3 |
children | 9228:e2e2aa76ea31 |
files | plugins/mod_version.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
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