mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Exclude invalid long messages from backups.
This commit is contained in:
@@ -296,6 +296,11 @@ class ChatItemArchiveExporter(
|
||||
}
|
||||
|
||||
val attachments = extraData.attachmentsById[record.id]
|
||||
if (attachments?.isNotEmpty() == true && attachments.all { it.contentType == MediaUtil.LONG_TEXT } && record.body.isNullOrEmpty()) {
|
||||
Log.w(TAG, "Record with ID ${record.id} has long text attachments, but no body. Skipping.")
|
||||
continue
|
||||
}
|
||||
|
||||
val sticker = attachments?.firstOrNull { dbAttachment -> dbAttachment.isSticker }
|
||||
|
||||
if (sticker?.stickerLocator != null) {
|
||||
|
||||
Reference in New Issue
Block a user