Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
2 merge requests!41Improved error messages,!27omemo version 2.0.3
......@@ -439,6 +439,7 @@ class OmemoState:
# Publish new bundle after PreKey has been used
# for building a new Session
self.plugin.publish_bundle(self.account)
self.add_device(recipient_id, device_id)
return key
except UntrustedIdentityException as e:
log.info(self.account + " => 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
else:
raise Exception("Received WhisperMessage "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment