aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pep.lua
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2013-05-17 18:35:50 +0200
committerFlorian Zeitz <florob@babelmonkeys.de>2013-05-17 18:35:50 +0200
commit08466bf01179e9816d25ed8890f5af9cc8109928 (patch)
tree72b82ac2fe86280758c645ac3baf565ef252433d /plugins/mod_pep.lua
parent519a21076d629db268b2816af0728b4ba1fed73f (diff)
downloadprosody-08466bf01179e9816d25ed8890f5af9cc8109928.tar.gz
prosody-08466bf01179e9816d25ed8890f5af9cc8109928.zip
mod_disco: Emit events for disco requests, which contain a node, on user accounts
Diffstat (limited to 'plugins/mod_pep.lua')
-rw-r--r--plugins/mod_pep.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index a65ee903..d59bd2a2 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -262,19 +262,19 @@ module:hook("iq-result/bare/disco", function(event)
end);
module:hook("account-disco-info", function(event)
- local stanza = event.stanza;
- stanza:tag('identity', {category='pubsub', type='pep'}):up();
- stanza:tag('feature', {var='http://jabber.org/protocol/pubsub#publish'}):up();
+ local reply = event.reply;
+ reply:tag('identity', {category='pubsub', type='pep'}):up();
+ reply:tag('feature', {var='http://jabber.org/protocol/pubsub#publish'}):up();
end);
module:hook("account-disco-items", function(event)
- local stanza = event.stanza;
- local bare = stanza.attr.to;
+ local reply = event.reply;
+ local bare = reply.attr.to;
local user_data = data[bare];
if user_data then
for node, _ in pairs(user_data) do
- stanza:tag('item', {jid=bare, node=node}):up(); -- TODO we need to handle queries to these nodes
+ reply:tag('item', {jid=bare, node=node}):up(); -- TODO we need to handle queries to these nodes
end
end
end);