Merge pull request #246 from ouchadam/bug/edit-own-message
Fix edits changing message order
This commit is contained in:
commit
1993ac12ad
|
@ -152,7 +152,6 @@ internal class TimelineEventMapper(
|
|||
|
||||
private fun RoomEvent.Message.edited(edit: ApiTimelineEvent.TimelineMessage) = this.copy(
|
||||
content = richMessageParser.parse(edit.asTextContent().let { it.formattedBody ?: it.body }?.removePrefix(" * ") ?: "redacted"),
|
||||
utcTimestamp = edit.utcTimestamp,
|
||||
edited = true,
|
||||
)
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ internal class RoomEventCreatorTest {
|
|||
|
||||
result shouldBeEqualTo aMatrixRoomMessageEvent(
|
||||
eventId = originalMessage.eventId,
|
||||
utcTimestamp = editedMessage.utcTimestamp,
|
||||
utcTimestamp = originalMessage.utcTimestamp,
|
||||
content = A_TEXT_EVENT_MESSAGE,
|
||||
author = A_SENDER,
|
||||
edited = true
|
||||
|
@ -166,7 +166,7 @@ internal class RoomEventCreatorTest {
|
|||
replyingTo = originalMessage.replyingTo,
|
||||
message = aMatrixRoomMessageEvent(
|
||||
eventId = originalMessage.eventId,
|
||||
utcTimestamp = editedMessage.utcTimestamp,
|
||||
utcTimestamp = originalMessage.utcTimestamp,
|
||||
content = A_TEXT_EVENT_MESSAGE,
|
||||
author = A_SENDER,
|
||||
edited = true
|
||||
|
|
Loading…
Reference in New Issue