diff mod_bookmarks/mod_bookmarks.lua @ 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 786ba175f2e5
children 9346ed926842
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);