[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
This commit is contained in:
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user