mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-20 11:08:31 +00:00
Add validations to ensure some simple chat updates are exported properly.
This commit is contained in:
committed by
Michelle Tang
parent
765c1eeab0
commit
179bd17680
@@ -265,22 +265,22 @@ class ChatItemArchiveExporter(
|
||||
}
|
||||
|
||||
MessageTypes.isReportedSpam(record.type) -> {
|
||||
builder.updateMessage = simpleUpdate(SimpleChatUpdate.Type.REPORTED_SPAM)
|
||||
builder.updateMessage = simpleUpdate(SimpleChatUpdate.Type.REPORTED_SPAM).takeIf { builder.authorId == selfRecipientId.toLong() }
|
||||
transformTimer.emit("simple-update")
|
||||
}
|
||||
|
||||
MessageTypes.isMessageRequestAccepted(record.type) -> {
|
||||
builder.updateMessage = simpleUpdate(SimpleChatUpdate.Type.MESSAGE_REQUEST_ACCEPTED)
|
||||
builder.updateMessage = simpleUpdate(SimpleChatUpdate.Type.MESSAGE_REQUEST_ACCEPTED).takeIf { builder.authorId == selfRecipientId.toLong() }
|
||||
transformTimer.emit("simple-update")
|
||||
}
|
||||
|
||||
MessageTypes.isBlocked(record.type) -> {
|
||||
builder.updateMessage = simpleUpdate(SimpleChatUpdate.Type.BLOCKED)
|
||||
builder.updateMessage = simpleUpdate(SimpleChatUpdate.Type.BLOCKED).takeIf { builder.authorId == selfRecipientId.toLong() }
|
||||
transformTimer.emit("simple-update")
|
||||
}
|
||||
|
||||
MessageTypes.isUnblocked(record.type) -> {
|
||||
builder.updateMessage = simpleUpdate(SimpleChatUpdate.Type.UNBLOCKED)
|
||||
builder.updateMessage = simpleUpdate(SimpleChatUpdate.Type.UNBLOCKED).takeIf { builder.authorId == selfRecipientId.toLong() }
|
||||
transformTimer.emit("simple-update")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user