Merge pull request #1938 from vector-im/feature/fga/user_detail_direct_chat

Feature/fga/user detail direct chat
This commit is contained in:
ganfra 2023-12-01 13:46:01 +01:00 committed by GitHub
commit 15d86c2981
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 562 additions and 259 deletions

View file

@ -241,9 +241,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) {