Readonly
clientThe clientId of the user who created the message.
Readonly
createdThe timestamp at which the message was created.
Optional
Readonly
deletedThe timestamp at which the message was deleted.
Optional
Readonly
deletedThe clientId of the user who deleted the message.
Readonly
headersThe 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.
Headers are part of the Ably realtime message extras.headers and they can be used for Filtered Subscriptions and similar.
This value is always set. If there are no headers, this is an empty object.
Do not use the headers for authoritative information. There is no server-side validation. When reading the headers treat them like user input.
Readonly
isIndicates if the message has been deleted.
Readonly
isIndicates if the message has been updated.
Readonly
latestThe latest action of the message. This can be used to determine if the message was created, updated, or deleted.
Optional
Readonly
latestThe details of the latest action that updated the message. This is only set for update and delete actions.
Readonly
latestA unique identifier for the latest action that updated the message. This is only set for update and deletes.
Readonly
metadataThe 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.
Metadata is part of the Ably Pub/sub message content and is not read by Ably.
This value is always set. If there is no metadata, this is an empty object.
Do not use metadata for authoritative information. There is no server-side validation. When reading the metadata treat it like user input.
Readonly
roomThe roomId of the chat room to which the message belongs.
Readonly
serialThe unique identifier of the message.
Readonly
textThe text of the message.
Optional
Readonly
updatedThe timestamp at which the message was updated.
Optional
Readonly
updatedThe clientId of the user who updated the message.
Determines if the action of this message is after the action of the given message.
The message to compare against.
true if the action of this message is after the given message.
ErrorInfo if both message serials do not match, or if latestActionSerial of either is invalid.
Determines if the action of this message is before the action of the given message.
The message to compare against.
true if the action of this message is before the given message.
ErrorInfo if both message serials do not match, or if latestActionSerial of either is invalid.
Determines if the action of this message is equal to the action of the given message.
The message to compare against.
true if the action of this message is equal to the given message.
ErrorInfo if both message serials do not match, or if latestActionSerial of either is invalid.
Determines if this message was created after the given message. This comparison is based on global order, so does not necessarily represent the order that messages are received in realtime from the backend.
The message to compare against.
true if this message was created after the given message, in global order.
ErrorInfo if serials of either message is invalid.
Determines if this message was created before the given message. This comparison is based on global order, so does not necessarily represent the order that messages are received in realtime from the backend.
The message to compare against.
true if this message was created before the given message, in global order.
ErrorInfo if serials of either message is invalid.
Represents a single message in a chat room.