UserService

interface UserService

This interface defines methods to get users. It's implemented at the session level.

Functions

Link copied to clipboard
abstract fun getIgnoredUsersLive(): LiveData<List<User>>

Get list of ignored users.

Link copied to clipboard
abstract fun getPagedUsersLive(filter: String? = null, excludedUserIds: Set<String>? = null): LiveData<PagedList<User>>

Observe a live PagedList of users sorted alphabetically. You can filter the users.

Link copied to clipboard
abstract fun getUser(userId: String): User?

Get a user from a userId.

Link copied to clipboard
abstract fun getUserLive(userId: String): LiveData<Optional<User>>

Observe a live user from a userId.

Link copied to clipboard
abstract fun getUsersLive(): LiveData<List<User>>

Observe a live list of users sorted alphabetically.

Link copied to clipboard
abstract suspend fun ignoreUserIds(userIds: List<String>)

Ignore users. Note: once done, for the change to take effect, you have to request an initial sync. This may be improved in the future.

Link copied to clipboard
abstract suspend fun resolveUser(userId: String): User

Try to resolve user from known users, or using profile api.

Link copied to clipboard
abstract suspend fun searchUsersDirectory(    search: String,     limit: Int,     excludedUserIds: Set<String>): List<User>

Search list of users on server directory.

Link copied to clipboard
abstract suspend fun unIgnoreUserIds(userIds: List<String>)

Un-ignore some users. Note: once done, for the change to take effect, you have to request an initial sync.