Software /
code /
prosody-modules
Changeset
3308:7155cc1adf8f
mod_bookmarks: Handle iq:private queries before mod_private
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Sep 2018 14:10:22 +0200 |
parents | 3307:303b17ec8264 |
children | 3309:c34f9fd632a6 |
files | mod_bookmarks/mod_bookmarks.lua |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_bookmarks/mod_bookmarks.lua Sun Sep 09 14:09:12 2018 +0200 +++ b/mod_bookmarks/mod_bookmarks.lua Sun Sep 09 14:10:22 2018 +0200 @@ -135,8 +135,13 @@ end 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("iq/bare/jabber:iq:private:query", function (event) + if event.stanza.attr.type == "get" then + return on_retrieve_private_xml(event); + else + return on_publish_private_xml(event); + end +end, 1); module:hook("resource-bind", on_resource_bind); module:hook("item-published/storage:bookmarks", on_item_published); module:handle_items("pep-service", function (event)