Fix handling of stickers with invalid locators in backups.

This commit is contained in:
Greyson Parrelli
2024-09-21 09:59:09 -04:00
parent 3c0e9c9e4e
commit f3a9f7f91d
2 changed files with 4 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import android.net.Uri
import android.os.Parcel
import org.thoughtcrime.securesms.blurhash.BlurHash
import org.thoughtcrime.securesms.database.AttachmentTable
import org.thoughtcrime.securesms.stickers.StickerLocator
import java.util.UUID
/**
@@ -53,6 +54,7 @@ class TombstoneAttachment : Attachment {
voiceNote: Boolean = false,
borderless: Boolean = false,
gif: Boolean = false,
stickerLocator: StickerLocator? = null,
quote: Boolean,
uuid: UUID?
) : super(
@@ -76,7 +78,7 @@ class TombstoneAttachment : Attachment {
incrementalMacChunkSize = incrementalMacChunkSize ?: 0,
uploadTimestamp = 0,
caption = caption,
stickerLocator = null,
stickerLocator = stickerLocator,
blurHash = BlurHash.parseOrNull(blurHash),
audioHash = null,
transformProperties = null,

View File

@@ -83,6 +83,7 @@ fun FilePointer?.toLocalAttachment(
borderless = borderless,
gif = gif,
quote = false,
stickerLocator = stickerLocator,
uuid = UuidUtil.fromByteStringOrNull(uuid)
)
} else if (this.backupLocator != null) {