aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-06-24 20:09:44 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-06-24 20:09:44 +0500
commitf8d5fecf5be78c128a33d8c2983230ac78bb0685 (patch)
tree882d5079d05e7ddc851d1c29cc46eeb4c4c5ade5 /plugins
parentfb62c6953c0dc57a9dce4719b2823742ca35b652 (diff)
downloadprosody-f8d5fecf5be78c128a33d8c2983230ac78bb0685.tar.gz
prosody-f8d5fecf5be78c128a33d8c2983230ac78bb0685.zip
mod_pep: Use new style events
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_pep.lua4
1 files changed, 2 insertions, 2 deletions
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 -- <pubsub xmlns='http://jabber.org/protocol/pubsub'>
@@ -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);