Skip quotes with authors that lack ACI and E164 during archive export.

This commit is contained in:
Greyson Parrelli
2026-03-03 09:50:29 -05:00
parent e23d575460
commit ba720efe61
2 changed files with 9 additions and 0 deletions

View File

@@ -218,6 +218,10 @@ object ExportOddities {
return log(sentTimestamp, "Quote author was not found in the exported recipients. Removing the quote.")
}
fun quoteAuthorHasNoAciOrE164(sentTimestamp: Long): String {
return log(sentTimestamp, "Quote author has neither an ACI nor an E164. Removing the quote.")
}
fun emptyQuote(sentTimestamp: Long): String {
return log(sentTimestamp, "Quote had no text or attachments. Removing it.")
}

View File

@@ -1179,6 +1179,11 @@ private fun BackupMessageRecord.toRemoteQuote(exportState: ExportState, attachme
return null
}
if (exportState.recipientIdToAci[this.quoteAuthor] == null && exportState.recipientIdToE164[this.quoteAuthor] == null) {
Log.w(TAG, ExportOddities.quoteAuthorHasNoAciOrE164(this.dateSent))
return null
}
val localType = QuoteModel.Type.fromCode(this.quoteType)
val remoteType = when (localType) {
QuoteModel.Type.NORMAL -> {