summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2018-11-19 01:44:48 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2019-12-27 18:56:27 +0100
commitfdf9b74056ce11c3278ddf9ccdcd0d4820ee7afe (patch)
tree426628ef639cc149de1cc9a831f1b371e10c055a
parent2348f3705c400aec330caef5c0f56c27fa5765d7 (diff)
downloadpoezio-fdf9b74056ce11c3278ddf9ccdcd0d4820ee7afe.tar.gz
poezio-fdf9b74056ce11c3278ddf9ccdcd0d4820ee7afe.tar.bz2
poezio-fdf9b74056ce11c3278ddf9ccdcd0d4820ee7afe.tar.xz
poezio-fdf9b74056ce11c3278ddf9ccdcd0d4820ee7afe.zip
omemo: don't deconstruct the result from the decrypt call
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--plugins/omemo_plugin.py4
1 files changed, 3 insertions, 1 deletions
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")