|
|
|
@ -328,17 +328,21 @@ class RustTimeline(
@@ -328,17 +328,21 @@ class RustTimeline(
|
|
|
|
|
runCatching<Unit> { |
|
|
|
|
when { |
|
|
|
|
originalEventId != null -> { |
|
|
|
|
inner.editByEventId( |
|
|
|
|
inner.getEventTimelineItemByEventId(originalEventId.value).use { |
|
|
|
|
inner.edit( |
|
|
|
|
newContent = messageEventContentFromParts(body, htmlBody).withMentions(mentions.map()), |
|
|
|
|
eventId = originalEventId.value, |
|
|
|
|
item = it, |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
transactionId != null -> { |
|
|
|
|
inner.getEventTimelineItemByTransactionId(transactionId.value).use { |
|
|
|
|
inner.edit( |
|
|
|
|
newContent = messageEventContentFromParts(body, htmlBody).withMentions(mentions.map()), |
|
|
|
|
item = inner.getEventTimelineItemByTransactionId(transactionId.value), |
|
|
|
|
item = it, |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else -> { |
|
|
|
|
error("Either originalEventId or transactionId must be non null") |
|
|
|
|
} |
|
|
|
|