summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2019-08-25 01:33:53 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2019-12-27 18:58:48 +0100
commitb40de0bcbe1c380c24ad82d4e9d6f771baea9c8c (patch)
tree5ab84e6528bc45bafcf0f410608cf59009828cd8
parent07447a465aab6836f8d1aded58e47251c3c7e6e2 (diff)
downloadpoezio-b40de0bcbe1c380c24ad82d4e9d6f771baea9c8c.tar.gz
poezio-b40de0bcbe1c380c24ad82d4e9d6f771baea9c8c.tar.bz2
poezio-b40de0bcbe1c380c24ad82d4e9d6f771baea9c8c.tar.xz
poezio-b40de0bcbe1c380c24ad82d4e9d6f771baea9c8c.zip
omemo: fix some errors / feedback in trust setting
-rw-r--r--poezio/plugin_e2ee.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/poezio/plugin_e2ee.py b/poezio/plugin_e2ee.py
index 2e982baf..f4d75def 100644
--- a/poezio/plugin_e2ee.py
+++ b/poezio/plugin_e2ee.py
@@ -242,18 +242,36 @@ class E2EEPlugin(BasePlugin):
def __command_set_state_global(self, args, state='') -> None:
jid, fpr = args
if state not in self._all_trust_states:
- self.api.information('Unknown state for plugin %s: %s' % (self.encryption_short_name, state), 'Error')
+ self.api.information(
+ 'Unknown state for plugin %s: %s' % (
+ self.encryption_short_name, state),
+ 'Error'
+ )
return
self.store_trust(jid, state, fpr)
@command_args_parser.quoted(1)
def __command_set_state_local(self, args, state='') -> None:
if isinstance(self.api.current_tab(), MucTab):
+ self.api.information(
+ 'You can only trust each participant of a MUC individually.',
+ 'Info',
+ )
+ return
+ jid = self.api.current_tab().name
+ if not args:
+ self.api.information(
+ 'No fingerprint provided to the command..',
+ 'Error',
+ )
return
- jid = self.api.get_current_tab().name
fpr = args[0]
if state not in self._all_trust_states:
- self.api.information('Unknown state for plugin %s: %s' % (self.encryption_short_name, state), 'Error')
+ self.api.information(
+ 'Unknown state for plugin %s: %s' % (
+ self.encryption_short_name, state),
+ 'Error',
+ )
return
self.store_trust(jid, state, fpr)