From ef05b6b0f7d5e6113c6082b9a731ec261675d0b1 Mon Sep 17 00:00:00 2001 From: Marat Alekperov Date: Thu, 16 Apr 2026 14:07:41 +0200 Subject: [PATCH 1/3] fix(cli-docs): update --channel flag and add --message flag to push publish - Update --channel description to mention --message companion flag - Add --message flag for attaching a realtime message when publishing via channel - Add example showing --channel with --message Co-Authored-By: Claude Sonnet 4.6 --- src/pages/docs/cli/push/publish.mdx | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/pages/docs/cli/push/publish.mdx b/src/pages/docs/cli/push/publish.mdx index 3e3a3c78a6..f080c02419 100644 --- a/src/pages/docs/cli/push/publish.mdx +++ b/src/pages/docs/cli/push/publish.mdx @@ -30,7 +30,11 @@ A raw JSON recipient object. Exclusive with `--device-id` and `--client-id`. ### `--channel` -The target channel name. Publishes a push notification via the channel using `extras.push`. Ignored if `--device-id`, `--client-id`, or `--recipient` is also provided. +The target channel name. Publishes a push notification via the channel using `extras.push`. Ignored if `--device-id`, `--client-id`, or `--recipient` is also provided. Use together with `--message` to provide a realtime message to push recipients. + +### `--message` + +Realtime message data to include alongside the push notification. Only applies when publishing via `--channel`. ### `--title` @@ -171,6 +175,22 @@ ably push publish --channel my-channel --payload '{"notification":{"title":"Hell ``` +Publish a push notification to a channel with a realtime message string: + + +```shell +ably push publish --channel my-channel --title Hello --body World --message 'Hello from push' +``` + + +Publish a push notification to a channel with a realtime message JSON payload: + + +```shell +ably push publish --channel my-channel --title Hello --body World --message '{"event":"push","text":"Hello"}' +``` + + Publish to a channel using a payload from a file: From c71335de19af2ff5425b91551361b6064673e585 Mon Sep 17 00:00:00 2001 From: Marat Al Date: Thu, 16 Apr 2026 14:29:16 +0200 Subject: [PATCH 2/3] Fix wording about realtime message to avoid confusion. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/pages/docs/cli/push/publish.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/cli/push/publish.mdx b/src/pages/docs/cli/push/publish.mdx index f080c02419..053121f744 100644 --- a/src/pages/docs/cli/push/publish.mdx +++ b/src/pages/docs/cli/push/publish.mdx @@ -30,7 +30,7 @@ A raw JSON recipient object. Exclusive with `--device-id` and `--client-id`. ### `--channel` -The target channel name. Publishes a push notification via the channel using `extras.push`. Ignored if `--device-id`, `--client-id`, or `--recipient` is also provided. Use together with `--message` to provide a realtime message to push recipients. +The target channel name. Publishes a push notification via the channel using `extras.push`. Ignored if `--device-id`, `--client-id`, or `--recipient` is also provided. Use together with `--message` to publish a realtime message on the channel alongside the push notification. ### `--message` From d5cf34a69f950245c761ff4757ad7fea76521a8b Mon Sep 17 00:00:00 2001 From: Marat Al Date: Thu, 16 Apr 2026 14:31:34 +0200 Subject: [PATCH 3/3] Fix wording for `--message` flag for complete description. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/pages/docs/cli/push/publish.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/cli/push/publish.mdx b/src/pages/docs/cli/push/publish.mdx index 053121f744..83917e5a31 100644 --- a/src/pages/docs/cli/push/publish.mdx +++ b/src/pages/docs/cli/push/publish.mdx @@ -34,7 +34,7 @@ The target channel name. Publishes a push notification via the channel using `ex ### `--message` -Realtime message data to include alongside the push notification. Only applies when publishing via `--channel`. +Realtime message data to include alongside the push notification. Accepts either plain text or raw JSON, and the value is used as the realtime message `data` payload rather than a full message object. Only applies when publishing via `--channel`. ### `--title`