Skip to content

Conversation

@maratal
Copy link

@maratal maratal commented Feb 10, 2026

It is not support of push notifications with deviceId or clientId. Just have added extras.push support for channel pushes. Tried locally with

./bin/run.js channels publish exampleChannel1 '{"data":"Test","extras":{"push":{"notification":{"title":"Hello","body":"World!"}}}}' --api-key "***"

and it works.


Note

Low Risk
Small, additive change to channels publish message construction that forwards extras to Ably; low blast radius but could affect message shape for callers relying on extras being embedded in data.

Overview
ably channels publish now forwards extras from JSON input into the outgoing Ably message (and removes it from data), enabling extras.push payloads for push notifications.

Documentation and command examples were updated to mention/show extras.push, and a new unit test asserts that extras.push is included in the publish call.

Written by Cursor Bugbot for commit 6a7494b. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • New Features

    • Added support for including push notification metadata (extras.push) in Ably channel message publish payloads, enabling push notification data to be transmitted alongside messages.
  • Documentation

    • Updated product requirements documentation to reflect the new push notification metadata publishing capability.
  • Tests

    • Added test coverage to verify push notification metadata is correctly passed through the publish flow.

@vercel
Copy link

vercel bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli-web-cli Ready Ready Preview, Comment Feb 10, 2026 1:58pm

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

Walkthrough

The changes add support for including extras.push in the Ably channel publish command payload. Documentation is updated to reflect this capability, implementation extracts extras from messageData and assigns them to the message's extras field, and tests verify the extras.push content passes through correctly to the channel publish call.

Changes

Cohort / File(s) Summary
Documentation
docs/Product-Requirements.md
Updated to document support for extras.push in the publish command payload for Ably channels.
Implementation
src/commands/channels/publish.ts
Added logic to extract extras from message data and assign to Ably.Message.extras, preventing duplication in the data payload. Includes CLI example demonstrating extras.push usage.
Tests
test/unit/commands/channels/publish.test.ts
Added test block verifying extras.push is correctly passed through to the channel.publish call with data integrity maintained.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A flutter through extras we go,
Push notifications now steal the show,
Separated from data with care and grace,
Message and extras each find their place! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately describes the main change: adding support for extras (specifically extras.push) in messages for channel push notifications, which aligns with the primary objective across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch channel-push-support

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
test/unit/commands/channels/publish.test.ts (1)

403-427: Consider asserting that extras is not present in data.

The test verifies that extras.push is set on the message and data equals "hello", which implicitly confirms extras was stripped from messageData. However, an explicit assertion like expect(publishArgs.data).not.toHaveProperty("extras") would make the deduplication intent clearer — especially since the implementation explicitly deletes extras from messageData to avoid duplication.

This is a minor suggestion; the current assertions do cover the happy path since data is the string "hello" (not an object that could contain extras).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@maratal maratal requested a review from AndyTWF February 10, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant