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
commit421bdc43997ee9215ce57ee73616f90ce695f601 (patch)
tree72b82ac2fe86280758c645ac3baf565ef252433d /plugins/mod_pep.lua
parentbb5dfce88b39f2a7211c4877afb1fcda0cf2d874 (diff)
downloadprosody-421bdc43997ee9215ce57ee73616f90ce695f601.tar.gz
prosody-421bdc43997ee9215ce57ee73616f90ce695f601.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);