# HG changeset patch # User Kim Alvefur # Date 1536494952 -7200 # Node ID 303b17ec826489336b2edfae857a6329112498dd # Parent b06fc0d030038639f4e113a14c1ce1c393265cb2 mod_bookmarks: Correctly hook events on PEP services Since each user has its own util.pubsub instance, this is needed to hook all of them. diff -r b06fc0d03003 -r 303b17ec8264 mod_bookmarks/mod_bookmarks.lua --- a/mod_bookmarks/mod_bookmarks.lua Sun Sep 09 13:11:29 2018 +0200 +++ b/mod_bookmarks/mod_bookmarks.lua Sun Sep 09 14:09:12 2018 +0200 @@ -139,4 +139,7 @@ module:hook("iq-set/bare/jabber:iq:private:query", on_publish_private_xml); module:hook("resource-bind", on_resource_bind); module:hook("item-published/storage:bookmarks", on_item_published); -module:hook("node-created", on_node_created); +module:handle_items("pep-service", function (event) + local service = event.item.service; + module:hook_object_event(service.events, "node-created", on_node_created); +end, function () end, true);