diff options
author | Philipp Hörist <forenjunkie@chello.at> | 2017-02-13 01:04:32 +0300 |
---|---|---|
committer | Philipp Hörist <forenjunkie@chello.at> | 2017-02-13 01:04:32 +0300 |
commit | 2e413819a5d8a2e294fd68b5902a44d661e4eb85 (patch) | |
tree | 39ac436b086f835b1367d33793531e8c83cfb762 | |
parent | f532fcbbe6f286f5bb6d58c62f7597e81b121bf5 (diff) |
[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
-rw-r--r-- | omemo/omemo/state.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/omemo/omemo/state.py b/omemo/omemo/state.py index 58c40ca..a7e96f2 100644 --- a/omemo/omemo/state.py +++ b/omemo/omemo/state.py @@ -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) + self.add_device(recipient_id, device_id) return key else: raise Exception("Received WhisperMessage " |