aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_version.lua
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-08-24 20:35:33 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-08-24 20:35:33 +0200
commit0207fe0e1da8ff34d8247c50daa150e9e0928f00 (patch)
treed70d0184f236db203e1f39e08454fd5816c142e7 /plugins/mod_version.lua
parentb7b67000ca6533c88a40a7ce1ded6a476c7a4538 (diff)
downloadprosody-0207fe0e1da8ff34d8247c50daa150e9e0928f00.tar.gz
prosody-0207fe0e1da8ff34d8247c50daa150e9e0928f00.zip
mod_version: Simplify iq handling by hooking on iq-get/ instead of iq/.
Diffstat (limited to 'plugins/mod_version.lua')
-rw-r--r--plugins/mod_version.lua4
1 files changed, 2 insertions, 2 deletions
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