From 82df03fc313dce410abc106c4ef08ef5e484b56b Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 2 Jul 2024 11:42:36 +0200 Subject: [PATCH] Timeline : re-enable edition of local echo --- .../android/libraries/matrix/impl/timeline/RustTimeline.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustTimeline.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustTimeline.kt index 582d658f67..443191a538 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustTimeline.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustTimeline.kt @@ -333,7 +333,10 @@ class RustTimeline( ) } transactionId != null -> { - error("Editing local echo is not supported yet.") + inner.edit( + newContent = messageEventContentFromParts(body, htmlBody).withMentions(mentions.map()), + item = inner.getEventTimelineItemByTransactionId(transactionId.value), + ) } else -> { error("Either originalEventId or transactionId must be non null")