# HG changeset patch # User Kim Alvefur # Date 1526855700 -7200 # Node ID 2c55fccb0c0c110631cae283224c9ddd9025afb4 # Parent 3d7fceaff2305062a42b0c7261797fb63ee7043d util.pubsub: Pass node and service objects to broadcaster to allow eg config access diff -r 3d7fceaff230 -r 2c55fccb0c0c util/pubsub.lua --- a/util/pubsub.lua Sun May 20 18:56:26 2018 +0200 +++ b/util/pubsub.lua Mon May 21 00:35:00 2018 +0200 @@ -289,7 +289,7 @@ 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 @@ 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 @@ 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 @@ 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