Browse Source

Merge pull request #3126 from element-hq/feature/fga/timeline_edit_local_echo

Timeline : re-enable edition of local echo
pull/3128/head
ganfra 3 months ago committed by GitHub
parent
commit
1c8d1f75ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustTimeline.kt

5
libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustTimeline.kt

@ -333,7 +333,10 @@ class RustTimeline( @@ -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")

Loading…
Cancel
Save