mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Redact event from the bottom sheet
This commit is contained in:
@@ -2,7 +2,6 @@ package io.element.android.x.matrix.room
|
||||
|
||||
import io.element.android.x.core.coroutine.CoroutineDispatchers
|
||||
import io.element.android.x.matrix.core.RoomId
|
||||
import io.element.android.x.matrix.core.UserId
|
||||
import io.element.android.x.matrix.timeline.MatrixTimeline
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
@@ -76,4 +75,11 @@ class MatrixRoom(
|
||||
room.send(content, transactionId)
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun redactEvent(eventId: String, reason: String? = null, ) = withContext(coroutineDispatchers.io) {
|
||||
val transactionId = genTransactionId()
|
||||
runCatching {
|
||||
room.redact(eventId, reason, transactionId)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user