Message

interface Message

Represents a single message in a chat room.

Not suitable for inheritance

This interface is not designed for implementation or extension outside this SDK. The interface definition may evolve over time with additional properties or methods to support new features, which could break implementations.

Properties

Link copied to clipboard
abstract val action: MessageAction

The latest action of the message. This can be used to determine if the message was created, updated, or deleted. Spec: CHA-M10

Link copied to clipboard
abstract val clientId: String

The clientId of the user who created the message.

Link copied to clipboard
abstract val headers: Map<String, String>

The headers of a chat message. Headers enable attaching extra info to a message, which can be used for various features such as linking to a relative point in time of a livestream video or flagging this message as important or pinned.

Link copied to clipboard
abstract val metadata: JsonObject

The metadata of a chat message. Allows for attaching extra info to a message, which can be used for various features such as animations, effects, or simply to link it to other resources such as images, relative points in time, etc.

Link copied to clipboard

The reactions summary for this message.

Link copied to clipboard
abstract val serial: String

The unique identifier of the message. Spec: CHA-M2d

Link copied to clipboard
abstract val text: String

The text of the message.

Link copied to clipboard
abstract val timestamp: Long

The timestamp at which the message was created.

Link copied to clipboard
abstract val version: MessageVersion

A unique identifier for the latest version of this message. Spec: CHA-M10a

Functions

Link copied to clipboard
fun Message.copy(text: String = this.text, headers: Map<String, String> = this.headers, metadata: JsonObject = this.metadata): Message
Link copied to clipboard