mod_bookmarks2: Advertise XEP-0049 support
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Sun, 26 Dec 2021 14:51:35 +0100
changeset 4842 fd2e48d4ac94
parent 4841 1f1acb7f3c10
child 4843 797b51043767
mod_bookmarks2: Advertise XEP-0049 support In the case mod_private isn’t loaded, some clients (like poezio) won’t even attempt to use Private XML Storage unless this feature is advertised. This is on the domain JID and not on the account JID!
mod_bookmarks2/mod_bookmarks2.lua
--- a/mod_bookmarks2/mod_bookmarks2.lua	Sun Dec 26 14:51:02 2021 +0100
+++ b/mod_bookmarks2/mod_bookmarks2.lua	Sun Dec 26 14:51:35 2021 +0100
@@ -33,6 +33,10 @@
 	event.reply:tag("feature", { var = namespace.."#compat-pep" }):up();
 end);
 
+-- This must be declared on the domain JID, not the account JID.  Note that
+-- this isn’t defined in the XEP.
+module:add_feature(namespace_private);
+
 local function generate_legacy_storage(items)
 	local storage = st.stanza("storage", { xmlns = namespace_legacy });
 	for _, item_id in ipairs(items) do