Rooms messages update

Open in

Use the ably rooms messages update command to update a message in an Ably Chat room.

Synopsis

ably rooms messages update <room-name> <message-serial> <text> [options]

Arguments

room-name
Required

The name of the chat room containing the message.

message-serial
Required

The serial identifier of the message to update.

text
Required

The new text content for the message.

Options

--description

A description of the update.

--headers

A JSON string of headers to attach to the update.

--metadata

A JSON string of metadata to attach to the updated message.

--client-id

A client ID to use when updating the message.

--json

Output results as compact JSON. Mutually exclusive with --pretty-json.

--pretty-json

Output results in formatted JSON. Mutually exclusive with --json.

--verbose | -v

Enable verbose logging. Can be combined with --json or --pretty-json.

Examples

Update a message:

ably rooms messages update my-room "msg-serial" "Updated message text"

Update a message with a description:

ably rooms messages update my-room "msg-serial" "Fixed typo" --description "Corrected spelling"

Update a message with metadata:

ably rooms messages update my-room "msg-serial" "Edited message" --metadata '{"edited": true}'

Update a room message with custom headers:

ably rooms messages update my-room "msg-serial" "Updated text" --headers '{"source":"cli"}'

Update a room message and output the result in JSON format:

ably rooms messages update my-room "msg-serial" "Updated text" --json

See also

  • Rooms — Explore all ably rooms commands.
  • CLI reference — Full list of available commands.