mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
fix: Make Client.findDM return a Result (#4816)
This commit is contained in:
committed by
GitHub
parent
fa2ac28166
commit
07af7cc643
+4
-2
@@ -297,8 +297,10 @@ class RustMatrixClient(
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun findDM(userId: UserId): RoomId? = withContext(sessionDispatcher) {
|
||||
innerClient.getDmRoom(userId.value)?.use { RoomId(it.id()) }
|
||||
override suspend fun findDM(userId: UserId): Result<RoomId?> = withContext(sessionDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerClient.getDmRoom(userId.value)?.use { RoomId(it.id()) }
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun ignoreUser(userId: UserId): Result<Unit> = withContext(sessionDispatcher) {
|
||||
|
||||
Reference in New Issue
Block a user