Software /
code /
prosody
Changeset
7703:74e755674e0f
util.pubsub: Rename loop variable to avoid name clash [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 18 Oct 2016 15:29:23 +0200 |
parents | 7702:9385c367e920 |
children | 7704:5022e6181193 7708:c420a38db5ef |
files | util/pubsub.lua |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/util/pubsub.lua Tue Oct 18 15:19:01 2016 +0200 +++ b/util/pubsub.lua Tue Oct 18 15:29:23 2016 +0200 @@ -371,13 +371,13 @@ -- 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 @@ 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