Mercurial > libervia-backend
diff libervia/backend/plugins/plugin_comp_email_gateway/__init__.py @ 4338:7c0b7ecb816f
component email gateway: Add a pubsub service:
a pubsub service is implemented to retrieve and manage attachments using XEP-0498.
rel 453
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 03 Dec 2024 00:13:23 +0100 |
parents | 95792a1f26c7 |
children |
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_comp_email_gateway/__init__.py Tue Dec 03 00:13:23 2024 +0100 +++ b/libervia/backend/plugins/plugin_comp_email_gateway/__init__.py Tue Dec 03 00:13:23 2024 +0100 @@ -49,6 +49,9 @@ from libervia.backend.memory.sqla import select from libervia.backend.memory.sqla_mapping import PrivateIndBin from libervia.backend.models.core import MessageData +from libervia.backend.plugins.plugin_comp_email_gateway.pubsub_service import ( + EmailGWPubsubService, +) from libervia.backend.plugins.plugin_xep_0033 import ( AddressType, AddressesData, @@ -175,8 +178,8 @@ else: log.debug(f"Connection to IMAP server successful for {user_jid}.") - def get_handler(self, __) -> XMPPHandler: - return EmailGatewayHandler() + def get_handler(self, __) -> tuple[XMPPHandler, XMPPHandler]: + return EmailGatewayHandler(), EmailGWPubsubService(self) async def profile_connecting(self, client: SatXMPPEntity) -> None: assert isinstance(client, SatXMPPComponent)