From 2d86208e9851fb9589d3d6db82fa635bb849b65e Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 3 May 2026 11:58:58 +0200 Subject: [PATCH] plugin XEP-0048: Don't use legacy bookmarks anymore on profile connection: Legacy bookmarks are not used anymore for autoconnect, it will be done from XEP-0402 now. --- libervia/backend/plugins/plugin_xep_0048.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/libervia/backend/plugins/plugin_xep_0048.py b/libervia/backend/plugins/plugin_xep_0048.py index 5d64b34d..8b4aec0d 100644 --- a/libervia/backend/plugins/plugin_xep_0048.py +++ b/libervia/backend/plugins/plugin_xep_0048.py @@ -107,6 +107,8 @@ class XEP_0048(object): log.info(_("Text commands not available")) async def profile_connected(self, client): + # FIXME: We should probably get fully rid of local bookmarks, and probably this + # whole plugin now that there is XEP-0402 local = client.bookmarks_local = PersistentBinaryDict( NS_BOOKMARKS, client.profile ) @@ -114,20 +116,6 @@ class XEP_0048(object): local = cast(dict[str, dict | None] | None, local) if not local: local = {XEP_0048.MUC_TYPE: {}, XEP_0048.URL_TYPE: {}} - private = await self._get_server_bookmarks("private", client.profile) - pubsub = client.bookmarks_pubsub = None - - for bookmarks in (local, private, pubsub): - if bookmarks is not None: - for room_jid, data in list(bookmarks[XEP_0048.MUC_TYPE].items()): - if data.get("autojoin", "false") == "true": - nick = data.get("nick", client.jid.user) - defer.ensureDeferred( - self.host.plugins["XEP-0045"].join(client, room_jid, nick, {}) - ) - - # we don't use a DeferredList to gather result here, as waiting for all room would - # slow down a lot the connection process, and result in a bad user experience. @defer.inlineCallbacks def _get_server_bookmarks(self, storage_type, profile):