Add IV to the attachment table.

This commit is contained in:
Greyson Parrelli
2024-08-30 12:11:22 -04:00
committed by Cody Henthorne
parent 07289b417b
commit 4b47d38d78
26 changed files with 534 additions and 309 deletions

View File

@@ -40,6 +40,7 @@ object FakeMessageRecords {
cdnNumber: Int = 3,
location: String = "",
key: String = "",
iv: ByteArray = byteArrayOf(),
relay: String = "",
digest: ByteArray = byteArrayOf(),
incrementalDigest: ByteArray = byteArrayOf(),
@@ -67,42 +68,43 @@ object FakeMessageRecords {
thumbnailRestoreState: AttachmentTable.ThumbnailRestoreState = AttachmentTable.ThumbnailRestoreState.NONE
): DatabaseAttachment {
return DatabaseAttachment(
attachmentId,
mmsId,
hasData,
hasThumbnail,
hasArchiveThumbnail,
contentType,
transferProgress,
size,
fileName,
Cdn.fromCdnNumber(cdnNumber),
location,
key,
digest,
incrementalDigest,
incrementalMacChunkSize,
fastPreflightId,
voiceNote,
borderless,
videoGif,
width,
height,
quote,
caption,
stickerLocator,
blurHash,
audioHash,
transformProperties,
displayOrder,
uploadTimestamp,
dataHash,
archiveCdn,
archiveThumbnailCdn,
archiveMediaId,
archiveMediaName,
thumbnailRestoreState,
null
attachmentId = attachmentId,
mmsId = mmsId,
hasData = hasData,
hasThumbnail = hasThumbnail,
hasArchiveThumbnail = hasArchiveThumbnail,
contentType = contentType,
transferProgress = transferProgress,
size = size,
fileName = fileName,
cdn = Cdn.fromCdnNumber(cdnNumber),
location = location,
key = key,
iv = iv,
digest = digest,
incrementalDigest = incrementalDigest,
incrementalMacChunkSize = incrementalMacChunkSize,
fastPreflightId = fastPreflightId,
voiceNote = voiceNote,
borderless = borderless,
videoGif = videoGif,
width = width,
height = height,
quote = quote,
caption = caption,
stickerLocator = stickerLocator,
blurHash = blurHash,
audioHash = audioHash,
transformProperties = transformProperties,
displayOrder = displayOrder,
uploadTimestamp = uploadTimestamp,
dataHash = dataHash,
archiveCdn = archiveCdn,
archiveThumbnailCdn = archiveThumbnailCdn,
archiveMediaName = archiveMediaId,
archiveMediaId = archiveMediaName,
thumbnailRestoreState = thumbnailRestoreState,
uuid = null
)
}