Software /
code /
prosody
Comparison
util/pubsub.lua @ 3945:39e34cb4c491
util.pubsub: Return correct node in get_subscriptions()
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 22 Dec 2010 17:42:35 +0100 |
parent | 3942:0323beb7183c |
child | 4099:5c0b7947f0ef |
comparison
equal
deleted
inserted
replaced
3944:74a422abec11 | 3945:39e34cb4c491 |
---|---|
302 if subs then | 302 if subs then |
303 for jid, subscribed_nodes in pairs(subs) do | 303 for jid, subscribed_nodes in pairs(subs) do |
304 if node then -- Return only subscriptions to this node | 304 if node then -- Return only subscriptions to this node |
305 if subscribed_nodes[node] then | 305 if subscribed_nodes[node] then |
306 ret[#ret+1] = { | 306 ret[#ret+1] = { |
307 node = node; | 307 node = subscribed_node; |
308 jid = jid; | 308 jid = jid; |
309 subscription = node_obj.subscribers[jid]; | 309 subscription = node_obj.subscribers[jid]; |
310 }; | 310 }; |
311 end | 311 end |
312 else -- Return subscriptions to all nodes | 312 else -- Return subscriptions to all nodes |