Perform a legacy session reset if you fail to decrypt a sync message.
This commit is contained in:
parent
5688d85789
commit
72e5532c6c
1 changed files with 10 additions and 0 deletions
|
@ -271,6 +271,16 @@ object MessageDecryptor {
|
|||
val receivedTimestamp: Long = System.currentTimeMillis()
|
||||
val sender: Recipient = Recipient.external(context, protocolException.sender)
|
||||
|
||||
if (sender.isSelf) {
|
||||
Log.w(TAG, "${logPrefix(envelope)} Decryption error for a sync message! Enqueuing a session reset job.")
|
||||
|
||||
followUpOperations += FollowUpOperation {
|
||||
AutomaticSessionResetJob(sender.id, senderDevice, envelope.timestamp)
|
||||
}
|
||||
|
||||
return Result.Ignore(envelope, serverDeliveredTimestamp, followUpOperations)
|
||||
}
|
||||
|
||||
followUpOperations += FollowUpOperation {
|
||||
buildSendRetryReceiptJob(envelope, protocolException, sender)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue