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>
This commit is contained in:
Maxime “pep” Buquet 2019-08-27 23:45:21 +02:00
parent ecdd036237
commit 931fc58199

View file

@ -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