Mercurial > prosody-modules
comparison mod_bookmarks/mod_bookmarks.lua @ 3307:303b17ec8264
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Sep 2018 14:09:12 +0200 |
parents | 947790ec4406 |
children | 7155cc1adf8f |
comparison
equal
deleted
inserted
replaced
3306:b06fc0d03003 | 3307:303b17ec8264 |
---|---|
137 | 137 |
138 module:hook("iq-get/bare/jabber:iq:private:query", on_retrieve_private_xml); | 138 module:hook("iq-get/bare/jabber:iq:private:query", on_retrieve_private_xml); |
139 module:hook("iq-set/bare/jabber:iq:private:query", on_publish_private_xml); | 139 module:hook("iq-set/bare/jabber:iq:private:query", on_publish_private_xml); |
140 module:hook("resource-bind", on_resource_bind); | 140 module:hook("resource-bind", on_resource_bind); |
141 module:hook("item-published/storage:bookmarks", on_item_published); | 141 module:hook("item-published/storage:bookmarks", on_item_published); |
142 module:hook("node-created", on_node_created); | 142 module:handle_items("pep-service", function (event) |
143 local service = event.item.service; | |
144 module:hook_object_event(service.events, "node-created", on_node_created); | |
145 end, function () end, true); |