diff options
author | Maxime “pep” Buquet <pep@bouah.net> | 2022-03-21 01:09:58 +0100 |
---|---|---|
committer | Maxime “pep” Buquet <pep@bouah.net> | 2022-03-21 17:45:30 +0100 |
commit | b2de905464e113b3db88633cc726b76847f4b040 (patch) | |
tree | 5f7008ce29d660fd863a9e310e983c40b180d931 | |
parent | 93c03c2b7e549088ec402ae4a9df633608e9c5d0 (diff) | |
download | poezio-b2de905464e113b3db88633cc726b76847f4b040.tar.gz poezio-b2de905464e113b3db88633cc726b76847f4b040.tar.bz2 poezio-b2de905464e113b3db88633cc726b76847f4b040.tar.xz poezio-b2de905464e113b3db88633cc726b76847f4b040.zip |
plugin_e2ee: get_fingerprint is now async
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r-- | poezio/plugin_e2ee.py | 8 |
1 files 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. |