From 0207fe0e1da8ff34d8247c50daa150e9e0928f00 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 24 Aug 2018 20:35:33 +0200 Subject: mod_version: Simplify iq handling by hooking on iq-get/ instead of iq/. --- plugins/mod_version.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/mod_version.lua') diff --git a/plugins/mod_version.lua b/plugins/mod_version.lua index 7f045415..e0d1def7 100644 --- a/plugins/mod_version.lua +++ b/plugins/mod_version.lua @@ -39,9 +39,9 @@ if not module:get_option_boolean("hide_os_type") then 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 -- cgit v1.2.3