aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime “pep” Buquet2019-08-27 21:45:21 (GMT)
committerMaxime “pep” Buquet2019-12-27 17:58:48 (GMT)
commit931fc581992fe0efeefece259673852fc7d0dfb2 (patch)
treef8282eca122677699576b2fb28039f1f77f689ae
parentecdd036237b4a78a08cb0a72a651b2077f6c721e (diff)
downloadpoezio-931fc581992fe0efeefece259673852fc7d0dfb2.tar.gz
poezio-931fc581992fe0efeefece259673852fc7d0dfb2.tar.xz
omemo: Update decrypt_message with slixmpp-omemo changes
decrypt_message now takes an Encrypted container and a sender (JID) instead of a Message object. 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 c59e021..496e0a1 100644
--- a/plugins/omemo_plugin.py
+++ b/plugins/omemo_plugin.py
@@ -86,7 +86,9 @@ class Plugin(E2EEPlugin):
body = None
try:
- body = self.core.xmpp['xep_0384'].decrypt_message(message, allow_untrusted)
+ mfrom = message['from']
+ encrypted = message['omemo_encrypted']
+ body = self.core.xmpp['xep_0384'].decrypt_message(encrypted, mfrom, allow_untrusted)
body = body.decode('utf-8')
except (MissingOwnKey,):
# The message is missing our own key, it was not encrypted for