Changeset

3253:cf8ad9fd7f15

mod_bookmarks: Use the new item-published/<node> event.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 21 Aug 2018 17:18:31 +0100
parents 3252:eec70a863d16
children 3254:af73963cf1dd
files mod_bookmarks/mod_bookmarks.lua
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mod_bookmarks/mod_bookmarks.lua	Tue Aug 21 11:01:46 2018 +0200
+++ b/mod_bookmarks/mod_bookmarks.lua	Tue Aug 21 17:18:31 2018 +0100
@@ -114,12 +114,10 @@
 end
 
 local function on_item_published(event)
-	if event.node == "storage:bookmarks" then
-		module:fire_event("bookmarks/updated", event);
-	end
+	module:fire_event("bookmarks/updated", event);
 end
 
 module:hook("iq-get/bare/jabber:iq:private:query", on_retrieve_private_xml);
 module:hook("iq-set/bare/jabber:iq:private:query", on_publish_private_xml);
 module:hook("resource-bind", on_resource_bind);
-module:hook("item-published", on_item_published);
+module:hook("item-published/storage:bookmarks", on_item_published);