File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ package org.matrix.android.sdk.api.session
19
19
import org.matrix.android.sdk.api.session.room.Room
20
20
import org.matrix.android.sdk.api.session.room.model.RoomSummary
21
21
import org.matrix.android.sdk.api.session.user.model.User
22
+ import timber.log.Timber
22
23
23
24
/* *
24
25
* Get a room using the RoomService of a Session.
@@ -41,4 +42,5 @@ fun Session.getUser(userId: String): User? = userService().getUser(userId)
41
42
/* *
42
43
* Similar to [getUser], but fallback to a User without details if the User is not known by the SDK, or if Session is null.
43
44
*/
44
- fun Session?.getUserOrDefault (userId : String ): User = this ?.userService()?.getUser(userId) ? : User (userId)
45
+ fun Session?.getUserOrDefault (userId : String ): User = this ?.userService()?.getUser(userId)
46
+ ? : User (userId).also { Timber .w(" User $userId not found in local cache, fallback to default" ) }
You can’t perform that action at this time.
0 commit comments