X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_ping.lua;h=1a5034094c9f2ac61744c1a4324e316dc065ba94;hb=db2ebc9585c3d52cd30f913728fedb54d76298f2;hp=eddb92d245ca92b927cedef079c889afcfe6e336;hpb=481ee86104d0dc5cc2965bd1c44a7080a3e4dc64;p=prosody.git diff --git a/plugins/mod_ping.lua b/plugins/mod_ping.lua index eddb92d2..1a503409 100644 --- a/plugins/mod_ping.lua +++ b/plugins/mod_ping.lua @@ -11,14 +11,11 @@ local st = require "util.stanza"; module:add_feature("urn:xmpp:ping"); local function ping_handler(event) - if event.stanza.attr.type == "get" then - event.origin.send(st.reply(event.stanza)); - return true; - end + return event.origin.send(st.reply(event.stanza)); end -module:hook("iq/bare/urn:xmpp:ping:ping", ping_handler); -module:hook("iq/host/urn:xmpp:ping:ping", ping_handler); +module:hook("iq-get/bare/urn:xmpp:ping:ping", ping_handler); +module:hook("iq-get/host/urn:xmpp:ping:ping", ping_handler); -- Ad-hoc command