Presence

@Serializable(with = Presence.Companion::class)
data class Presence(val presenceRef: String, val state: JsonObject)(source)

Constructors

Link copied to clipboard
constructor(presenceRef: String, state: JsonObject)

Types

Link copied to clipboard
object Companion : KSerializer<Presence>

Properties

Link copied to clipboard

The presence reference of the object

Link copied to clipboard
val state: JsonObject

The state is the object the other client is tracking. Can be done via the RealtimeChannel.track method

Functions

Link copied to clipboard
inline fun <T> stateAs(serializer: SupabaseSerializer): T

Decodes state as T

Link copied to clipboard
inline fun <T> stateAsOrNull(serializer: SupabaseSerializer): T?

Decodes state as T or null if there is an exception while decoding