Rust sdk : handle api changes (draft and edit)
This commit is contained in:
parent
0826a94a5d
commit
2a7154b53e
2 changed files with 3 additions and 3 deletions
|
|
@ -19,8 +19,8 @@ package io.element.android.libraries.matrix.impl.room.draft
|
||||||
import io.element.android.libraries.matrix.api.core.EventId
|
import io.element.android.libraries.matrix.api.core.EventId
|
||||||
import io.element.android.libraries.matrix.api.room.draft.ComposerDraft
|
import io.element.android.libraries.matrix.api.room.draft.ComposerDraft
|
||||||
import io.element.android.libraries.matrix.api.room.draft.ComposerDraftType
|
import io.element.android.libraries.matrix.api.room.draft.ComposerDraftType
|
||||||
import uniffi.matrix_sdk_base.ComposerDraft as RustComposerDraft
|
import org.matrix.rustcomponents.sdk.ComposerDraft as RustComposerDraft
|
||||||
import uniffi.matrix_sdk_base.ComposerDraftType as RustComposerDraftType
|
import org.matrix.rustcomponents.sdk.ComposerDraftType as RustComposerDraftType
|
||||||
|
|
||||||
internal fun ComposerDraft.into(): RustComposerDraft {
|
internal fun ComposerDraft.into(): RustComposerDraft {
|
||||||
return RustComposerDraft(
|
return RustComposerDraft(
|
||||||
|
|
|
||||||
|
|
@ -327,7 +327,7 @@ class RustTimeline(
|
||||||
runCatching<Unit> {
|
runCatching<Unit> {
|
||||||
when {
|
when {
|
||||||
originalEventId != null -> {
|
originalEventId != null -> {
|
||||||
inner.edit(
|
inner.editByEventId(
|
||||||
newContent = messageEventContentFromParts(body, htmlBody).withMentions(mentions.map()),
|
newContent = messageEventContentFromParts(body, htmlBody).withMentions(mentions.map()),
|
||||||
eventId = originalEventId.value,
|
eventId = originalEventId.value,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue