Fix recipient on some update messages when exporting.
This commit is contained in:
parent
6928c22477
commit
9823563ef7
1 changed files with 4 additions and 4 deletions
|
@ -432,10 +432,10 @@ private fun BackupMessageRecord.toBasicChatItemBuilder(selfRecipientId: Recipien
|
|||
|
||||
// If a user restores a backup with a different number, then they'll have outgoing messages from a non-self contact.
|
||||
// We want to ensure all outgoing messages are from ourselves.
|
||||
val fromRecipientId = if (direction == Direction.OUTGOING) {
|
||||
selfRecipientId.toLong()
|
||||
} else {
|
||||
record.fromRecipientId
|
||||
val fromRecipientId = when {
|
||||
direction == Direction.OUTGOING -> selfRecipientId.toLong()
|
||||
direction == Direction.DIRECTIONLESS && MessageTypes.isOutgoingMessageType(record.type) -> selfRecipientId.toLong()
|
||||
else -> record.fromRecipientId
|
||||
}
|
||||
|
||||
val builder = ChatItem.Builder().apply {
|
||||
|
|
Loading…
Add table
Reference in a new issue