From b2de905464e113b3db88633cc726b76847f4b040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Mon, 21 Mar 2022 01:09:58 +0100 Subject: plugin_e2ee: get_fingerprint is now async MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/plugin_e2ee.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poezio/plugin_e2ee.py b/poezio/plugin_e2ee.py index 9381fe76..38ecbb83 100644 --- a/poezio/plugin_e2ee.py +++ b/poezio/plugin_e2ee.py @@ -273,9 +273,9 @@ class E2EEPlugin(BasePlugin): 'Info', ) - def _show_fingerprints(self, jid: JID) -> None: + async def _show_fingerprints(self, jid: JID) -> None: """Display encryption fingerprints for a JID.""" - fprs = self.get_fingerprints(jid) + fprs = await self.get_fingerprints(jid) if len(fprs) == 1: self.api.information( f'Fingerprint for {jid}: {fprs[0]}', @@ -305,7 +305,7 @@ class E2EEPlugin(BasePlugin): 'Error', ) return None - self._show_fingerprints(JID(jid)) + asyncio.create_task(self._show_fingerprints(JID(jid))) @command_args_parser.quoted(2) def __command_set_state_global(self, args, state='') -> None: @@ -656,7 +656,7 @@ class E2EEPlugin(BasePlugin): raise NotImplementedError - def get_fingerprints(self, jid: JID) -> List[str]: + async def get_fingerprints(self, jid: JID) -> List[str]: """Show fingerprint(s) for this encryption method and JID. To overload in plugins. -- cgit v1.2.3