Ignore/Unignore: makes more sense to be at the client level than room

This commit is contained in:
ganfra 2023-04-27 22:13:25 +02:00
parent b433725783
commit 64c50d4468
10 changed files with 60 additions and 35 deletions

View file

@ -35,6 +35,8 @@ interface MatrixClient : Closeable {
val invitesDataSource: RoomSummaryDataSource
fun getRoom(roomId: RoomId): MatrixRoom?
fun findDM(userId: UserId): MatrixRoom?
suspend fun ignoreUser(userId: UserId): Result<Unit>
suspend fun unignoreUser(userId: UserId): Result<Unit>
suspend fun createRoom(createRoomParams: CreateRoomParameters): Result<RoomId>
suspend fun createDM(userId: UserId): Result<RoomId>
fun startSync()

View file

@ -68,10 +68,6 @@ interface MatrixRoom : Closeable {
suspend fun redactEvent(eventId: EventId, reason: String? = null): Result<Unit>
suspend fun ignoreUser(userId: UserId): Result<Unit>
suspend fun unignoreUser(userId: UserId): Result<Unit>
suspend fun leave(): Result<Unit>
suspend fun acceptInvitation(): Result<Unit>