Fix export issue around long-text and quote-long texts.

This commit is contained in:
Greyson Parrelli
2025-12-16 12:19:40 -05:00
committed by jeffrey-signal
parent ce86b511f0
commit c18e6e5e67

View File

@@ -1133,7 +1133,7 @@ private fun BackupMessageRecord.toRemoteStandardMessage(exportState: ExportState
* you should set it as the value for [StandardMessage.longText].
*/
private fun BackupMessageRecord.getBodyText(attachments: List<DatabaseAttachment>?): Pair<String, DatabaseAttachment?> {
val longTextAttachment = attachments?.firstOrNull { it.contentType == "text/x-signal-plain" }
val longTextAttachment = attachments?.firstOrNull { it.contentType == "text/x-signal-plain" && !it.quote }
if (longTextAttachment == null) {
return this.body.emptyIfNull() to null
}