Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/omemo
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2017-03-01 00:43:35 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-03-01 00:43:35 +0300
commit282f56558325fc14fd7e3a545bf09737c706d559 (patch)
tree6773ee37a66ce75939b822ab5cdc56c1737b8af7 /omemo
parent547fda1b667312a2b3d8e201cd42efd30571ddf7 (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
Diffstat (limited to 'omemo')
-rw-r--r--omemo/omemo/state.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/omemo/omemo/state.py b/omemo/omemo/state.py
index 2a9d5d0..2a899d1 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, textMsg=False)
+ self.add_device(recipient_id, device_id)
return key
else:
raise Exception("Received WhisperMessage "