Ensure editMessage, enterSpecialMode and replyMessage are called on the current timeline.
This commit is contained in:
parent
16bdd34a80
commit
6b8552fac1
3 changed files with 0 additions and 50 deletions
|
|
@ -131,12 +131,6 @@ interface MatrixRoom : Closeable {
|
||||||
|
|
||||||
suspend fun sendMessage(body: String, htmlBody: String?, mentions: List<Mention>): Result<Unit>
|
suspend fun sendMessage(body: String, htmlBody: String?, mentions: List<Mention>): Result<Unit>
|
||||||
|
|
||||||
suspend fun editMessage(originalEventId: EventId?, transactionId: TransactionId?, body: String, htmlBody: String?, mentions: List<Mention>): Result<Unit>
|
|
||||||
|
|
||||||
suspend fun enterSpecialMode(eventId: EventId?): Result<Unit>
|
|
||||||
|
|
||||||
suspend fun replyMessage(eventId: EventId, body: String, htmlBody: String?, mentions: List<Mention>): Result<Unit>
|
|
||||||
|
|
||||||
suspend fun redactEvent(eventId: EventId, reason: String? = null): Result<Unit>
|
suspend fun redactEvent(eventId: EventId, reason: String? = null): Result<Unit>
|
||||||
|
|
||||||
suspend fun sendImage(
|
suspend fun sendImage(
|
||||||
|
|
|
||||||
|
|
@ -326,24 +326,6 @@ class RustMatrixRoom(
|
||||||
return liveTimeline.sendMessage(body, htmlBody, mentions)
|
return liveTimeline.sendMessage(body, htmlBody, mentions)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun editMessage(
|
|
||||||
originalEventId: EventId?,
|
|
||||||
transactionId: TransactionId?,
|
|
||||||
body: String,
|
|
||||||
htmlBody: String?,
|
|
||||||
mentions: List<Mention>,
|
|
||||||
): Result<Unit> {
|
|
||||||
return liveTimeline.editMessage(originalEventId, transactionId, body, htmlBody, mentions)
|
|
||||||
}
|
|
||||||
|
|
||||||
override suspend fun enterSpecialMode(eventId: EventId?): Result<Unit> {
|
|
||||||
return liveTimeline.enterSpecialMode(eventId)
|
|
||||||
}
|
|
||||||
|
|
||||||
override suspend fun replyMessage(eventId: EventId, body: String, htmlBody: String?, mentions: List<Mention>): Result<Unit> {
|
|
||||||
return liveTimeline.replyMessage(eventId, body, htmlBody, mentions)
|
|
||||||
}
|
|
||||||
|
|
||||||
override suspend fun redactEvent(eventId: EventId, reason: String?) = withContext(roomDispatcher) {
|
override suspend fun redactEvent(eventId: EventId, reason: String?) = withContext(roomDispatcher) {
|
||||||
runCatching {
|
runCatching {
|
||||||
innerRoom.redact(eventId.value, reason)
|
innerRoom.redact(eventId.value, reason)
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,6 @@ class FakeMatrixRoom(
|
||||||
private var updatePowerLevelsResult = Result.success(Unit)
|
private var updatePowerLevelsResult = Result.success(Unit)
|
||||||
private var resetPowerLevelsResult = Result.success(defaultRoomPowerLevels())
|
private var resetPowerLevelsResult = Result.success(defaultRoomPowerLevels())
|
||||||
var sendMessageMentions = emptyList<Mention>()
|
var sendMessageMentions = emptyList<Mention>()
|
||||||
val editMessageCalls = mutableListOf<Pair<String, String?>>()
|
|
||||||
private val _typingRecord = mutableListOf<Boolean>()
|
private val _typingRecord = mutableListOf<Boolean>()
|
||||||
val typingRecord: List<Boolean>
|
val typingRecord: List<Boolean>
|
||||||
get() = _typingRecord
|
get() = _typingRecord
|
||||||
|
|
@ -296,31 +295,6 @@ class FakeMatrixRoom(
|
||||||
return eventPermalinkResult(eventId)
|
return eventPermalinkResult(eventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun editMessage(
|
|
||||||
originalEventId: EventId?,
|
|
||||||
transactionId: TransactionId?,
|
|
||||||
body: String,
|
|
||||||
htmlBody: String?,
|
|
||||||
mentions: List<Mention>
|
|
||||||
): Result<Unit> {
|
|
||||||
sendMessageMentions = mentions
|
|
||||||
editMessageCalls += body to htmlBody
|
|
||||||
return Result.success(Unit)
|
|
||||||
}
|
|
||||||
|
|
||||||
var replyMessageParameter: Pair<String, String?>? = null
|
|
||||||
private set
|
|
||||||
|
|
||||||
override suspend fun enterSpecialMode(eventId: EventId?): Result<Unit> {
|
|
||||||
return Result.success(Unit)
|
|
||||||
}
|
|
||||||
|
|
||||||
override suspend fun replyMessage(eventId: EventId, body: String, htmlBody: String?, mentions: List<Mention>): Result<Unit> {
|
|
||||||
sendMessageMentions = mentions
|
|
||||||
replyMessageParameter = body to htmlBody
|
|
||||||
return Result.success(Unit)
|
|
||||||
}
|
|
||||||
|
|
||||||
var redactEventEventIdParam: EventId? = null
|
var redactEventEventIdParam: EventId? = null
|
||||||
private set
|
private set
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue