equal
deleted
inserted
replaced
266 if not id then return; end |
266 if not id then return; end |
267 service.config.broadcaster("items", node, { [jid] = true }, item); |
267 service.config.broadcaster("items", node, { [jid] = true }, item); |
268 end |
268 end |
269 |
269 |
270 local function update_subscriptions(recipient, service_name, nodes) |
270 local function update_subscriptions(recipient, service_name, nodes) |
271 local service = get_pep_service(service_name); |
|
272 nodes = nodes or empty_set; |
271 nodes = nodes or empty_set; |
273 |
272 |
274 local service_recipients = recipients[service_name]; |
273 local service_recipients = recipients[service_name]; |
275 if not service_recipients then |
274 if not service_recipients then |
276 service_recipients = {}; |
275 service_recipients = {}; |
284 |
283 |
285 if (current == empty_set or current:empty()) and (nodes == empty_set or nodes:empty()) then |
284 if (current == empty_set or current:empty()) and (nodes == empty_set or nodes:empty()) then |
286 return; |
285 return; |
287 end |
286 end |
288 |
287 |
|
288 local service = get_pep_service(service_name); |
289 for node in current - nodes do |
289 for node in current - nodes do |
290 service:remove_subscription(node, recipient, recipient); |
290 service:remove_subscription(node, recipient, recipient); |
291 end |
291 end |
292 |
292 |
293 for node in nodes - current do |
293 for node in nodes - current do |