Fix potential validation error with mentions.

This commit is contained in:
Greyson Parrelli
2026-02-24 11:40:58 -05:00
committed by Cody Henthorne
parent 65b96fff16
commit bb6b149c2e

View File

@@ -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
)
}
}