RoomAccountDataService

interface RoomAccountDataService

This service is attached to a single room.

Functions

Link copied to clipboard
abstract fun getAccountDataEvent(type: String): RoomAccountDataEvent?

Retrieve the account data with the provided type or null if not found.

Link copied to clipboard
abstract fun getAccountDataEvents(types: Set<String>): List<RoomAccountDataEvent>

Retrieve the account data with the provided types. The return list can have a different size that the size of the types set, because some AccountData may not exist. If an empty set is provided, all the AccountData are retrieved.

Link copied to clipboard
abstract fun getLiveAccountDataEvent(type: String): LiveData<Optional<RoomAccountDataEvent>>

Observe the account data with the provided type.

Link copied to clipboard
abstract fun getLiveAccountDataEvents(types: Set<String>): LiveData<List<RoomAccountDataEvent>>

Observe the account data with the provided types. If an empty set is provided, all the AccountData are observed.

Link copied to clipboard
abstract suspend fun updateAccountData(type: String, content: Content)

Update the account data with the provided type and the provided account data content.