From f8d5fecf5be78c128a33d8c2983230ac78bb0685 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 24 Jun 2009 20:09:44 +0500 Subject: mod_pep: Use new style events --- plugins/mod_pep.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua index 5c6d2cdd..2ba2f8b0 100644 --- a/plugins/mod_pep.lua +++ b/plugins/mod_pep.lua @@ -73,7 +73,8 @@ module:hook("presence/bare", function(event) end end, 10); -module:add_iq_handler("c2s", "http://jabber.org/protocol/pubsub", function (session, stanza) +module:hook("iq/bare/http://jabber.org/protocol/pubsub:pubsub", function(event) + local session, stanza = event.origin, event.stanza; if stanza.attr.type == 'set' and (not stanza.attr.to or jid_bare(stanza.attr.from) == stanza.attr.to) then local payload = stanza.tags[1]; if payload.name == 'pubsub' then -- @@ -88,6 +89,5 @@ module:add_iq_handler("c2s", "http://jabber.org/protocol/pubsub", function (sess end -- TODO else error end end - session.send(st.error_reply(stanza, "cancel", "service-unavailable")); end); -- cgit v1.2.3