aboutsummaryrefslogtreecommitdiffstats
path: root/util/pubsub.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-10-18 19:07:55 +0200
committerKim Alvefur <zash@zash.se>2016-10-18 19:07:55 +0200
commitf1c2f29484997c0a953a248241768df1c3736df5 (patch)
treea7bd7a664b80ac2d321bef9ef2e7a465e32982a5 /util/pubsub.lua
parentda9ff7d218486105eb2e529cfe8e22346aa53430 (diff)
parent5bbd2aa2ff4137e9dc7b47ee76723319cbfc75dc (diff)
downloadprosody-f1c2f29484997c0a953a248241768df1c3736df5.tar.gz
prosody-f1c2f29484997c0a953a248241768df1c3736df5.zip
Merge 0.10->trunk
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r--util/pubsub.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua
index 520d80a7..e96df5fc 100644
--- a/util/pubsub.lua
+++ b/util/pubsub.lua
@@ -371,13 +371,13 @@ function service:get_subscriptions(node, actor, jid)
-- a get_subscription() call for each node.
local ret = {};
if subs then
- for jid, subscribed_nodes in pairs(subs) do
+ for subscribed_jid, subscribed_nodes in pairs(subs) do
if node then -- Return only subscriptions to this node
if subscribed_nodes[node] then
ret[#ret+1] = {
node = node;
- jid = jid;
- subscription = node_obj.subscribers[jid];
+ jid = subscribed_jid;
+ subscription = node_obj.subscribers[subscribed_jid];
};
end
else -- Return subscriptions to all nodes
@@ -385,8 +385,8 @@ function service:get_subscriptions(node, actor, jid)
for subscribed_node in pairs(subscribed_nodes) do
ret[#ret+1] = {
node = subscribed_node;
- jid = jid;
- subscription = nodes[subscribed_node].subscribers[jid];
+ jid = subscribed_jid;
+ subscription = nodes[subscribed_node].subscribers[subscribed_jid];
};
end
end