Presence

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

Types

Link copied to clipboard
data class Caller(onJoin: OnJoin, onLeave: OnLeave, onSync: OnSync)

Collection of callbacks with default values

Link copied to clipboard
object Companion
Link copied to clipboard
enum Events : Enum<Presence.Events>

Presence Events of "state" and "diff"

Link copied to clipboard
data class Options(events: Map<Presence.Events, String>)

Custom options that can be provided when creating Presence

Functions

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

Properties

Link copied to clipboard
var joinRef: String?

The channel's joinRef, set when state events occur

Link copied to clipboard
var pendingDiffs: MutableList<PresenceDiff>

Pending join and leave diffs that need to be synced

Link copied to clipboard
var state: PresenceState

The state of the Presence