aboutsummaryrefslogtreecommitdiffstats
path: root/util/pubsub.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r--util/pubsub.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua
index c449625a..4f5b51ec 100644
--- a/util/pubsub.lua
+++ b/util/pubsub.lua
@@ -517,7 +517,9 @@ function service:publish(node, actor, id, item, required_config)
return nil, "internal-server-error";
end
if type(ok) == "string" then id = ok; end
- self.events.fire_event("item-published", { node = node, actor = actor, id = id, item = item });
+ local event_data = { node = node, actor = actor, id = id, item = item };
+ self.events.fire_event("item-published/"..node, event_data);
+ self.events.fire_event("item-published", event_data);
self.config.broadcaster("items", node, node_obj.subscribers, item, actor, node_obj, self);
return true;
end