Comparison

util/pubsub.lua @ 5628:ba5c2f6b799e

util.pubsub: Fix get_subscriptions to not pass a boolean as node name (thanks jonas)
author Kim Alvefur <zash@zash.se>
date Sun, 26 May 2013 16:01:09 +0200
parent 5320:518d864b2ab8
child 5675:e29ece65e3b0
comparison
equal deleted inserted replaced
5621:63cfd59999b6 5628:ba5c2f6b799e
348 if subs then 348 if subs then
349 for jid, subscribed_nodes in pairs(subs) do 349 for jid, subscribed_nodes in pairs(subs) do
350 if node then -- Return only subscriptions to this node 350 if node then -- Return only subscriptions to this node
351 if subscribed_nodes[node] then 351 if subscribed_nodes[node] then
352 ret[#ret+1] = { 352 ret[#ret+1] = {
353 node = subscribed_nodes[node]; 353 node = node;
354 jid = jid; 354 jid = jid;
355 subscription = node_obj.subscribers[jid]; 355 subscription = node_obj.subscribers[jid];
356 }; 356 };
357 end 357 end
358 else -- Return subscriptions to all nodes 358 else -- Return subscriptions to all nodes