diff options
author | Maxime “pep” Buquet <pep@bouah.net> | 2022-03-21 14:14:55 +0100 |
---|---|---|
committer | Maxime “pep” Buquet <pep@bouah.net> | 2022-03-21 17:45:30 +0100 |
commit | 19c8590790ac44e29109ffbf3a419b129334852a (patch) | |
tree | f46520bae7f1a0526b6760d5d278982a3f6e9d92 | |
parent | 3c7fb0b79245dedb890abc7be47b0359f9034985 (diff) | |
download | poezio-19c8590790ac44e29109ffbf3a419b129334852a.tar.gz poezio-19c8590790ac44e29109ffbf3a419b129334852a.tar.bz2 poezio-19c8590790ac44e29109ffbf3a419b129334852a.tar.xz poezio-19c8590790ac44e29109ffbf3a419b129334852a.zip |
plugin_e2ee: Allow /<name>_fingerprint in RosterInfoTab without argument
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r-- | poezio/plugin_e2ee.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/poezio/plugin_e2ee.py b/poezio/plugin_e2ee.py index e081cb50..6e0bbc0c 100644 --- a/poezio/plugin_e2ee.py +++ b/poezio/plugin_e2ee.py @@ -31,6 +31,7 @@ from poezio.tabs import ( DynamicConversationTab, MucTab, PrivateTab, + RosterInfoTab, StaticConversationTab, ) from poezio.plugin import BasePlugin @@ -301,8 +302,12 @@ class E2EEPlugin(BasePlugin): @command_args_parser.quoted(0, 1) def _command_show_fingerprints(self, args: List[str]) -> None: - if not args and isinstance(self.api.current_tab(), self.supported_tab_types): - jid = self.api.current_tab().jid + tab = self.api.current_tab() + if not args and isinstance(tab, self.supported_tab_types): + jid = tab.jid + elif not args and isinstance(tab, RosterInfoTab): + # Allow running the command without arguments in roster tab + jid = self.core.xmpp.boundjid.bare elif args: jid = args[0] else: |