Commit 282f5655 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[omemo] Set devices active after receiving a msg

Inactive or not known devices are added to the list
of possible receiving devices after we receive them
with a PreKeyWhisperMessage or WhisperMessage

This is so we dont have to rely only on devicelist
updates from the server
parent 547fda1b
......@@ -439,6 +439,7 @@ class OmemoState:
# Publish new bundle after PreKey has been used
# for building a new Session
self.add_device(recipient_id, device_id)
return key
except UntrustedIdentityException as e: + " => Received WhisperMessage " +
......@@ -451,6 +452,7 @@ class OmemoState:
if self.isTrusted(recipient_id, device_id):
sessionCipher = self.get_session_cipher(recipient_id, device_id)
key = sessionCipher.decryptMsg(whisperMessage, textMsg=False)
self.add_device(recipient_id, device_id)
return key
raise Exception("Received WhisperMessage "
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment