aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);