Mercurial > libervia-backend
diff libervia/backend/plugins/plugin_xep_0376.py @ 4327:554a87ae17a6
plugin XEP-0048, XEP-0402; CLI (bookmarks): implement XEP-0402 (PEP Native Bookmarks):
- Former bookmarks implementation is now labeled as "legacy".
- XEP-0402 is now used for bookmarks when relevant namespaces are found, and it fallbacks
to legacy XEP-0048/XEP-0049 bookmarks otherwise.
- CLI legacy bookmark commands have been moved to `bookmarks legacy`
- CLI bookmarks commands now use the new XEP-0402 (with fallback to legacy one
automatically used if necessary).
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 20 Nov 2024 11:43:27 +0100 |
parents | 9658c534287e |
children |
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0376.py Wed Nov 20 11:38:44 2024 +0100 +++ b/libervia/backend/plugins/plugin_xep_0376.py Wed Nov 20 11:43:27 2024 +0100 @@ -105,7 +105,10 @@ sub_jid: Optional[jid.JID] = None, options: Optional[dict] = None, ) -> Tuple[bool, Optional[pubsub.Subscription]]: - if not await self.host.memory.disco.has_feature(client, NS_PAM) or client.is_component: + if ( + not await self.host.memory.disco.has_feature(client, NS_PAM) + or client.is_component + ): return True, None await self._sub_request(client, service, nodeIdentifier, sub_jid, options, True) @@ -127,7 +130,10 @@ subscriptionIdentifier: Optional[str], sender: Optional[jid.JID] = None, ) -> bool: - if not await self.host.memory.disco.has_feature(client, NS_PAM) or client.is_component: + if ( + not await self.host.memory.disco.has_feature(client, NS_PAM) + or client.is_component + ): return True await self._sub_request(client, service, nodeIdentifier, sub_jid, None, False) return False