Message

data class Message(val joinRef: String? = null, val ref: String = "", val topic: String = "", val event: String = "", rawPayload: Payload = HashMap(), val payloadJson: String = "")

Constructors

Link copied to clipboard
constructor(joinRef: String? = null, ref: String = "", topic: String = "", event: String = "", rawPayload: Payload = HashMap(), payloadJson: String = "")

Properties

Link copied to clipboard

The message event name, for example "phx_join" or any other custom name

Link copied to clipboard
val joinRef: String? = null

The ref sent during a join event. Empty if not present.

Link copied to clipboard

The payload of the message

Link copied to clipboard

The payload, as a json string

Link copied to clipboard
val ref: String

The unique string ref. Empty if not present

Link copied to clipboard

Convenience var to access the message's payload's status. Equivalent to checking message.payload"status" yourself

Link copied to clipboard

The message topic