Presence

class Presence(channel: Channel, opts: Presence.Options)

Types

Caller
Link copied to clipboard
data class Caller(onJoin: OnJoin, onLeave: OnLeave, onSync: OnSync)
Collection of callbacks with default values
Companion
Link copied to clipboard
object Companion
Events
Link copied to clipboard
enum Events : Enum<Presence.Events>
Presence Events of "state" and "diff"
Options
Link copied to clipboard
data class Options(events: Map<Presence.Events, String>)
Custom options that can be provided when creating Presence

Functions

filterBy
Link copied to clipboard
fun filterBy(predicate: (Map.Entry<String, PresenceMap>) -> Boolean?): PresenceState
list
Link copied to clipboard
fun list(): List<PresenceMap>
listBy
Link copied to clipboard
fun <T> listBy(transform: (Map.Entry<String, PresenceMap>) -> T): List<T>
onJoin
Link copied to clipboard
fun onJoin(callback: OnJoin)
onLeave
Link copied to clipboard
fun onLeave(callback: OnLeave)
onSync
Link copied to clipboard
fun onSync(callback: OnSync)

Properties

isPendingSyncState
Link copied to clipboard
val isPendingSyncState: Boolean
True if the Presence has not yet initially synced
joinRef
Link copied to clipboard
var joinRef: String?
The channel's joinRef, set when state events occur
pendingDiffs
Link copied to clipboard
var pendingDiffs: MutableList<PresenceDiff>
Pending join and leave diffs that need to be synced
state
Link copied to clipboard
var state: PresenceState
The state of the Presence