-
Notifications
You must be signed in to change notification settings - Fork 46
fix: update channel push CLI commands to use push publish --channel flag #3310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
maratal
wants to merge
2
commits into
main
Choose a base branch
from
DX-927-new-CLI-push-commands-
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+18
−7
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -659,11 +659,14 @@ Build and run your app on an Android device or emulator. Tap **Activate Push** a | |||||
|
|
||||||
| ### Send push via channel <a id="step-4-send-channel"/> | ||||||
|
|
||||||
| To test push notifications via channel, tap **Subscribe to Channel** in the app and then publish a message to "exampleChannel1" with a `push` `extras` field using Ably CLI: | ||||||
| To test push notifications via channel, tap **Subscribe to Channel** in the app and then send a push notification to the channel using the Ably CLI: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| <Code> | ||||||
| ```shell | ||||||
| ably channels publish exampleChannel1 '{"name":"example","data":"Hello from CLI!","extras":{"push":{"notification":{"title":"Ably CLI","body":"Hello from CLI!"},"data":{"foo":"bar"}}}}' | ||||||
| ably push publish --channel exampleChannel1 \ | ||||||
| --title "Hello" \ | ||||||
| --body "World!" \ | ||||||
| --message '{"name":"greeting","data":"Hello World!"}' | ||||||
|
maratal marked this conversation as resolved.
|
||||||
| ``` | ||||||
| </Code> | ||||||
|
|
||||||
|
|
@@ -823,5 +826,6 @@ Build and run your app again. Use the new buttons to send push notifications dir | |||||
| * Explore [push notification administration](/docs/push#push-admin) for managing devices and subscriptions. | ||||||
| * Learn about [rules](/docs/channels#rules) for channel-based push notifications. | ||||||
| * Read more about the [Push Admin API](/docs/api/realtime-sdk/push-admin). | ||||||
| * Explore [Ably CLI push commands](/docs/cli/push) for the full list of push CLI options. | ||||||
|
maratal marked this conversation as resolved.
|
||||||
|
|
||||||
| You can also explore the [Ably SDK for Android](https://github.com/ably/ably-java) on GitHub, or visit the [API references](/docs/api/realtime-sdk?lang=kotlin) for additional functionality. | ||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -570,11 +570,14 @@ Try sending push using this `deviceId` or `clientId` as shown earlier. | |||||
|
|
||||||
| ### Send push via channel <a id="step-4-send-channel"/> | ||||||
|
|
||||||
| To test pushes via channel, subscribe to the channel in the UI and post a message to the "exampleChannel1" with a `push` `extras` field using Ably CLI: | ||||||
| To test pushes via channel, subscribe to the channel in the UI and send a push notification to the channel using the Ably CLI: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| <Code> | ||||||
| ```shell | ||||||
| ably channels publish exampleChannel1 '{"name":"example","data":"Hello from CLI!","extras":{"push":{"notification":{"title":"Ably CLI","body":"Hello from CLI!"},"data":{"foo":"bar"}}}}' | ||||||
| ably push publish --channel exampleChannel1 \ | ||||||
| --title "Hello" \ | ||||||
| --body "World!" \ | ||||||
| --message '{"name":"greeting","data":"Hello World!"}' | ||||||
|
maratal marked this conversation as resolved.
|
||||||
| ``` | ||||||
| </Code> | ||||||
|
|
||||||
|
|
@@ -727,5 +730,6 @@ Safari on macOS 13+ supports Web Push, but with some limitations. Notification a | |||||
| * Learn about [rules](/docs/channels#rules) for channel-based push notifications. | ||||||
| * Read more about the [Push Admin API](/docs/api/realtime-sdk/push-admin). | ||||||
| * Check out the [Web Push Notifications](/docs/push/configure/web) documentation for advanced use cases. | ||||||
| * Explore [Ably CLI push commands](/docs/cli/push) for the full list of push CLI options. | ||||||
|
maratal marked this conversation as resolved.
|
||||||
|
|
||||||
| You can also explore the [Ably JavaScript SDK](https://github.com/ably/ably-js) on GitHub, or visit the [API references](/docs/api/realtime-sdk?lang=javascript) for additional functionality. | ||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.