mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-02 08:23:00 +01:00
Drop quotes with unexported authors during backup export.
This commit is contained in:
committed by
Cody Henthorne
parent
92a9f12b58
commit
ba03ca5e0c
@@ -214,6 +214,10 @@ object ExportOddities {
|
||||
return log(0, "Distribution list had self as a member. Removing it.")
|
||||
}
|
||||
|
||||
fun quoteAuthorNotFound(sentTimestamp: Long): String {
|
||||
return log(sentTimestamp, "Quote author was not found in the exported recipients. Removing the quote.")
|
||||
}
|
||||
|
||||
fun emptyQuote(sentTimestamp: Long): String {
|
||||
return log(sentTimestamp, "Quote had no text or attachments. Removing it.")
|
||||
}
|
||||
|
||||
@@ -1174,6 +1174,11 @@ private fun BackupMessageRecord.toRemoteQuote(exportState: ExportState, attachme
|
||||
return null
|
||||
}
|
||||
|
||||
if (!exportState.recipientIds.contains(this.quoteAuthor)) {
|
||||
Log.w(TAG, ExportOddities.quoteAuthorNotFound(this.dateSent))
|
||||
return null
|
||||
}
|
||||
|
||||
val localType = QuoteModel.Type.fromCode(this.quoteType)
|
||||
val remoteType = when (localType) {
|
||||
QuoteModel.Type.NORMAL -> {
|
||||
|
||||
Reference in New Issue
Block a user