Mercurial > libervia-backend
changeset 4004:cd6f70015738
plugin XEP-0384: run `profileConnected` workflow in background:
XEP-0384 connection workflow can be very long when connecting after a while (due to
OLDMEMO migration notably), which can lead to bad UX.
It is not necessary to `await` it as `encrypt` and `decrypt` already wait for the plugin
to be initialized correctly, so the workflow is now run in background.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 10 Mar 2023 17:22:45 +0100 |
parents | 1a77e1f866f9 |
children | 54a6b44f173b |
files | sat/plugins/plugin_xep_0384.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0384.py Fri Mar 10 17:22:45 2023 +0100 +++ b/sat/plugins/plugin_xep_0384.py Fri Mar 10 17:22:45 2023 +0100 @@ -1622,7 +1622,7 @@ else: self.__text_commands.registerTextCommands(self) - async def profileConnected( # pylint: disable=invalid-name + def profileConnected( # pylint: disable=invalid-name self, client: SatXMPPClient ) -> None: @@ -1630,9 +1630,9 @@ @param client: The client. """ - await self.get_session_manager( + defer.ensureDeferred(self.get_session_manager( cast(str, client.profile) - ) + )) async def cmd_omemo_reset( self,