Exclude invalid long messages from backups.
This commit is contained in:
parent
cdc9d3e07d
commit
cc3c75c870
1 changed files with 5 additions and 0 deletions
|
@ -296,6 +296,11 @@ class ChatItemArchiveExporter(
|
||||||
}
|
}
|
||||||
|
|
||||||
val attachments = extraData.attachmentsById[record.id]
|
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 }
|
val sticker = attachments?.firstOrNull { dbAttachment -> dbAttachment.isSticker }
|
||||||
|
|
||||||
if (sticker?.stickerLocator != null) {
|
if (sticker?.stickerLocator != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue