Companion

object Companion

Functions

filter
Link copied to clipboard
fun filter(presence: PresenceState, predicate: (Map.Entry<String, PresenceMap>) -> Boolean?): PresenceState
listBy
Link copied to clipboard
fun <T> listBy(presence: PresenceState, transform: (Map.Entry<String, PresenceMap>) -> T): List<T>
syncDiff
Link copied to clipboard
fun syncDiff(currentState: PresenceState, diff: PresenceDiff, onJoin: OnJoin = { _, _, _ -> }, onLeave: OnLeave = { _, _, _ -> }): PresenceState
Used to sync a diff of presence join and leave events from the server, as they happen.
syncState
Link copied to clipboard
fun syncState(currentState: PresenceState, newState: PresenceState, onJoin: OnJoin = { _, _, _ -> }, onLeave: OnLeave = { _, _, _ -> }): PresenceState
Used to sync the list of presences on the server with the client's state.