plugin_e2ee: handle empty args in /foo_state commands

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2021-08-07 01:08:10 +02:00
parent 00a91774fc
commit 7f1e9b080c
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -291,6 +291,12 @@ class E2EEPlugin(BasePlugin):
@command_args_parser.quoted(2)
def __command_set_state_global(self, args, state='') -> None:
if not args:
self.api.information(
'No fingerprint provided to the command..',
'Error',
)
return
jid, fpr = args
if state not in self._all_trust_states:
self.api.information(