diff options
author | Kim Alvefur <zash@zash.se> | 2018-05-21 00:35:00 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-05-21 00:35:00 +0200 |
commit | 308036df995469175f80de91165430b38144f843 (patch) | |
tree | 21264cc7119a45dd31924481b21ad5188439c141 /util/pubsub.lua | |
parent | 127ca3002014e5e327c816b0b7c652b7c0d4d8e6 (diff) | |
download | prosody-308036df995469175f80de91165430b38144f843.tar.gz prosody-308036df995469175f80de91165430b38144f843.zip |
util.pubsub: Pass node and service objects to broadcaster to allow eg config access
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r-- | util/pubsub.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua index 97d636ce..7cf376ef 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -289,7 +289,7 @@ function service:delete(node, actor) end self.data[node] = nil; self.events.fire_event("node-deleted", { node = node, actor = actor }); - self.config.broadcaster("delete", node, node_obj.subscribers); + self.config.broadcaster("delete", node, node_obj.subscribers, nil, actor, node_obj, self); return true; end @@ -320,7 +320,7 @@ function service:publish(node, actor, id, item) end if type(ok) == "string" then id = ok; end self.events.fire_event("item-published", { node = node, actor = actor, id = id, item = item }); - self.config.broadcaster("items", node, node_obj.subscribers, item, actor); + self.config.broadcaster("items", node, node_obj.subscribers, item, actor, node_obj, self); return true; end @@ -340,7 +340,7 @@ function service:retract(node, actor, id, retract) end self.events.fire_event("item-retracted", { node = node, actor = actor, id = id }); if retract then - self.config.broadcaster("items", node, node_obj.subscribers, retract); + self.config.broadcaster("items", node, node_obj.subscribers, retract, actor, node_obj, self); end return true end @@ -362,7 +362,7 @@ function service:purge(node, actor, notify) end self.events.fire_event("node-purged", { node = node, actor = actor }); if notify then - self.config.broadcaster("purge", node, node_obj.subscribers); + self.config.broadcaster("purge", node, node_obj.subscribers, nil, actor, node_obj, self); end return true end |