Software /
code /
prosody
Comparison
util/pubsub.lua @ 6435:689cb04ff9fd
util.pubsub: Use local
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 27 Sep 2014 19:57:33 +0200 |
parent | 5972:f365d3c8fd2c |
child | 6436:31ca87ea8d46 |
comparison
equal
deleted
inserted
replaced
6434:382e03a40dd2 | 6435:689cb04ff9fd |
---|---|
276 end | 276 end |
277 node_obj = self.nodes[node]; | 277 node_obj = self.nodes[node]; |
278 end | 278 end |
279 local node_data = self.data[node]; | 279 local node_data = self.data[node]; |
280 remove_item_by_id(node_data, id); | 280 remove_item_by_id(node_data, id); |
281 node_data[#self.data[node] + 1] = id; | 281 node_data[#node_data + 1] = id; |
282 node_data[id] = item; | 282 node_data[id] = item; |
283 self.events.fire_event("item-published", { node = node, actor = actor, id = id, item = item }); | 283 self.events.fire_event("item-published", { node = node, actor = actor, id = id, item = item }); |
284 self.config.broadcaster("items", node, node_obj.subscribers, item); | 284 self.config.broadcaster("items", node, node_obj.subscribers, item); |
285 return true; | 285 return true; |
286 end | 286 end |