mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-02 08:23:00 +01:00
Fix potential validation error with mentions.
This commit is contained in:
committed by
Cody Henthorne
parent
65b96fff16
commit
bb6b149c2e
@@ -1365,11 +1365,12 @@ private fun FailureReason?.toRemote(): PaymentNotification.TransactionDetails.Fa
|
||||
}
|
||||
|
||||
private fun List<Mention>.toRemoteBodyRanges(exportState: ExportState): List<BackupBodyRange> {
|
||||
return this.map {
|
||||
return this.mapNotNull {
|
||||
val aci = exportState.recipientIdToAci[it.recipientId.toLong()] ?: return@mapNotNull null
|
||||
BackupBodyRange(
|
||||
start = it.start,
|
||||
length = it.length,
|
||||
mentionAci = exportState.recipientIdToAci[it.recipientId.toLong()]
|
||||
mentionAci = aci
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user