From fdf9b74056ce11c3278ddf9ccdcd0d4820ee7afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Mon, 19 Nov 2018 01:44:48 +0100 Subject: omemo: don't deconstruct the result from the decrypt call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- plugins/omemo_plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/omemo_plugin.py b/plugins/omemo_plugin.py index 8759957b..4d3eabec 100644 --- a/plugins/omemo_plugin.py +++ b/plugins/omemo_plugin.py @@ -122,5 +122,7 @@ class Plugin(BasePlugin): self.info('Foo2') if self.xmpp['xep_0384'].is_encrypted(message): - _always_none, body = self.xmpp['xep_0384'].decrypt_message(message) + body = self.xmpp['xep_0384'].decrypt_message(message) + if body is None: # Message wasn't decrypted + return None message['body'] = body.decode("utf8") -- cgit v1.2.3