plugin_e2ee: Allow /<name>_fingerprint in RosterInfoTab without argument
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
3c7fb0b792
commit
19c8590790
1 changed files with 7 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue