Optional
headersOptional headers of the message.
The headers are a flat key-value map and are sent as part of the realtime
message's extras inside the headers
property. They can serve similar
purposes as the metadata but they are read by Ably and can be used for
features such as
subscription filters.
Do not use the headers for authoritative information. There is no server-side validation. When reading the headers treat them like user input.
Optional
metadataOptional metadata of the message.
The metadata is a map of extra information that can be attached to chat messages. It is not used by Ably and is sent as part of the realtime message payload. Example use cases are setting custom styling like background or text colors or fonts, adding links to external images, emojis, etc.
Do not use metadata for authoritative information. There is no server-side validation. When reading the metadata treat it like user input.
The text of the message.
Params for updating a message. It accepts all parameters that sending a message accepts.
Note that updating a message replaces the whole previous message, so all metadata and headers that should be kept must be set in the update request, or they will be lost.