currentPresences

inline fun <Data> RealtimeChannel.currentPresences(ignoreOtherTypes: Boolean = true): List<Data>(source)

Returns the current presences as a typed list. This is a snapshot of all currently tracked presences in the channel, deserialized as Data.

Example:

@Serializable
data class UserPresence(val name: String)

val onlineUsers = channel.currentPresences<UserPresence>()

Parameters

ignoreOtherTypes

Whether to ignore presences that cannot be decoded as Data (e.g. your own presence without state). Defaults to true.