diff libervia/backend/plugins/plugin_xep_0060.py @ 4334:111dce64dcb5

plugins XEP-0300, XEP-0446, XEP-0447, XEP0448 and others: Refactoring to use Pydantic: Pydantic models are used more and more in Libervia, for the bridge API, and also to convert `domish.Element` to internal representation. Type hints have also been added in many places. rel 453
author Goffi <goffi@goffi.org>
date Tue, 03 Dec 2024 00:12:38 +0100
parents 554a87ae17a6
children
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0060.py	Tue Dec 03 00:11:00 2024 +0100
+++ b/libervia/backend/plugins/plugin_xep_0060.py	Tue Dec 03 00:12:38 2024 +0100
@@ -711,10 +711,10 @@
         client: SatXMPPEntity,
         service: jid.JID,
         nodeIdentifier: str,
-        items: list[pubsub.Item]|None = None,
-        options: dict|None = None,
-        sender: jid.JID|None = None,
-        extra: dict[str, Any]|None = None,
+        items: list[pubsub.Item] | None = None,
+        options: dict | None = None,
+        sender: jid.JID | None = None,
+        extra: dict[str, Any] | None = None,
     ) -> domish.Element:
         """Publish pubsub items
 
@@ -807,13 +807,13 @@
     async def get_items(
         self,
         client: SatXMPPEntity,
-        service: jid.JID|None,
+        service: jid.JID | None,
         node: str,
-        max_items: int|None = None,
-        item_ids: list[str]|None = None,
-        sub_id: str|None = None,
-        rsm_request: rsm.RSMRequest|None = None,
-        extra: dict|None = None,
+        max_items: int | None = None,
+        item_ids: list[str] | None = None,
+        sub_id: str | None = None,
+        rsm_request: rsm.RSMRequest | None = None,
+        extra: dict | None = None,
     ) -> tuple[list[domish.Element], dict]:
         """Retrieve pubsub items from a node.