Comparison

mod_bookmarks2/mod_bookmarks2.lua @ 4838:fd2e48d4ac94

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!
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 26 Dec 2021 14:51:35 +0100
parent 4837:1f1acb7f3c10
child 4839:797b51043767
comparison
equal deleted inserted replaced
4837:1f1acb7f3c10 4838:fd2e48d4ac94
30 module:hook("account-disco-info", function (event) 30 module:hook("account-disco-info", function (event)
31 -- This Time it’s Serious! 31 -- This Time it’s Serious!
32 event.reply:tag("feature", { var = namespace.."#compat" }):up(); 32 event.reply:tag("feature", { var = namespace.."#compat" }):up();
33 event.reply:tag("feature", { var = namespace.."#compat-pep" }):up(); 33 event.reply:tag("feature", { var = namespace.."#compat-pep" }):up();
34 end); 34 end);
35
36 -- This must be declared on the domain JID, not the account JID. Note that
37 -- this isn’t defined in the XEP.
38 module:add_feature(namespace_private);
35 39
36 local function generate_legacy_storage(items) 40 local function generate_legacy_storage(items)
37 local storage = st.stanza("storage", { xmlns = namespace_legacy }); 41 local storage = st.stanza("storage", { xmlns = namespace_legacy });
38 for _, item_id in ipairs(items) do 42 for _, item_id in ipairs(items) do
39 local item = items[item_id]; 43 local item = items[item_id];