mod_delegation/mod_delegation.lua
changeset 3275 7504f765e767
parent 2762 82109d8eca41
child 3321 36a9170352b5
--- a/mod_delegation/mod_delegation.lua	Fri Aug 24 21:35:47 2018 +0200
+++ b/mod_delegation/mod_delegation.lua	Fri Aug 24 21:36:58 2018 +0200
@@ -565,7 +565,6 @@
 	--		account-disco-items can't be cancelled (return value of hooks are not checked in mod_disco), so corountine needs
 	--		to be used with util.async (to get the IQ result, merge items then return from the event)
 	local origin, stanza = event.origin, event.stanza;
-	if stanza.attr.type ~= "get" then return; end
 	local node = stanza.tags[1].attr.node;
 	local username = jid_split(stanza.attr.to) or origin.username;
 	if not stanza.attr.to or is_contact_subscribed(username, module.host, jid_bare(stanza.attr.from)) then
@@ -578,7 +577,7 @@
 		end
 	end
 end
-module:hook("iq/bare/http://jabber.org/protocol/disco#items:query", disco_items_hook, 100)
+module:hook("iq-get/bare/http://jabber.org/protocol/disco#items:query", disco_items_hook, 100)
 
 local function disco_items_raw_hook(event)
 	-- this method is called when account-disco-items-* event are not called