# HG changeset patch # User Emmanuel Gil Peyrot # Date 1535135733 -7200 # Node ID c0e058633d9af9dc3aa8eafd460e92ffe422e713 # Parent affd84be3fc37a2c9a04f850a9105de76991ad8d mod_version: Simplify iq handling by hooking on iq-get/ instead of iq/. diff -r affd84be3fc3 -r c0e058633d9a plugins/mod_version.lua --- 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