Migration to normalize all attachments

This commit is contained in:
trevor-signal
2025-05-29 14:50:14 -04:00
committed by GitHub
parent a2c50b1895
commit a2f0f4c8a4
3 changed files with 38 additions and 1 deletions

View File

@@ -2580,7 +2580,11 @@ function saveMessageAttachment({
: null,
backupMediaName: attachment.backupLocator?.mediaName,
backupCdnNumber: attachment.backupLocator?.cdnNumber,
incrementalMac: attachment.incrementalMac,
incrementalMac:
// resilience to Uint8Array-stored incrementalMac values
typeof attachment.incrementalMac === 'string'
? attachment.incrementalMac
: null,
incrementalMacChunkSize: attachment.chunkSize,
isReencryptableToSameDigest: convertOptionalBooleanToNullableInteger(
attachment.isReencryptableToSameDigest