mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-15 07:28:30 +00:00
Ensure envelope model updates info from metadata.
In practice this doesn't really matter because we don't read from it after this point, but good to be consistent.
This commit is contained in:
committed by
jeffrey-signal
parent
3542c363d9
commit
1bd5b03636
@@ -156,6 +156,15 @@ object MessageDecryptor {
|
||||
val cipherResult: SignalServiceCipherResult? = cipher.decrypt(envelope, serverDeliveredTimestamp)
|
||||
val endTimeNanos = System.nanoTime()
|
||||
|
||||
val envelope = if (cipherResult?.metadata?.sourceServiceId != null) {
|
||||
envelope.newBuilder()
|
||||
.sourceServiceId(cipherResult.metadata.sourceServiceId.toString())
|
||||
.sourceDevice(cipherResult.metadata.sourceDeviceId)
|
||||
.build()
|
||||
} else {
|
||||
envelope
|
||||
}
|
||||
|
||||
if (cipherResult == null) {
|
||||
Log.w(TAG, "${logPrefix(envelope)} Decryption resulted in a null result!", true)
|
||||
return Result.Ignore(envelope, serverDeliveredTimestamp, followUpOperations.toUnmodifiableList())
|
||||
|
||||
Reference in New Issue
Block a user