Software /
code /
prosody
Comparison
util/pubsub.lua @ 5181:1e9508ae44cc
util.pubsub: Add item-published event
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 15 Nov 2012 13:24:44 -0500 |
parent | 4367:98b258b7d5dc |
child | 5305:391b72fede9f |
comparison
equal
deleted
inserted
replaced
5180:4ef69555a879 | 5181:1e9508ae44cc |
---|---|
242 return ok, err; | 242 return ok, err; |
243 end | 243 end |
244 node_obj = self.nodes[node]; | 244 node_obj = self.nodes[node]; |
245 end | 245 end |
246 node_obj.data[id] = item; | 246 node_obj.data[id] = item; |
247 self.events.fire_event("item-published", { node = node, actor = actor, id = id, item = item }); | |
247 self.config.broadcaster(node, node_obj.subscribers, item); | 248 self.config.broadcaster(node, node_obj.subscribers, item); |
248 return true; | 249 return true; |
249 end | 250 end |
250 | 251 |
251 function service:retract(node, actor, id, retract) | 252 function service:retract(node, actor, id, retract) |