StartDM : add tests

This commit is contained in:
ganfra 2023-11-30 18:05:26 +01:00
parent e55fab29e4
commit 3efbf4747d
19 changed files with 320 additions and 196 deletions

View file

@ -240,9 +240,8 @@ class RustMatrixClient constructor(
}
}
override suspend fun findDM(userId: UserId): MatrixRoom? {
val roomId = client.getDmRoom(userId.value)?.use { RoomId(it.id()) }
return roomId?.let { getRoom(it) }
override suspend fun findDM(userId: UserId): RoomId? {
return client.getDmRoom(userId.value)?.use { RoomId(it.id()) }
}
override suspend fun ignoreUser(userId: UserId): Result<Unit> = withContext(sessionDispatcher) {