Skip to content

feat: subscribeTo and subscribeFrom push notifications#276

Merged
yamal-alm merged 3 commits into
masterfrom
push-subscription-methods
Jun 29, 2026
Merged

feat: subscribeTo and subscribeFrom push notifications#276
yamal-alm merged 3 commits into
masterfrom
push-subscription-methods

Conversation

@yamal-alm

@yamal-alm yamal-alm commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Implementation of #275

@yamal-alm yamal-alm changed the title New methods: subscribeTo and subscribeFrom push notifications feat: subscribeTo and subscribeFrom push notifications Jun 25, 2026
Comment thread .prettierignore
/dist
/coverage No newline at end of file
/coverage
CHANGELOG.md No newline at end of file

@yamal-alm yamal-alm Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHANGELOG.md is autogenerated by a workflow and sometimes it doesn't comply with Prettier rules, in fact it is failing in master right now. I'm excluding it from Prettier execution but another solution would be to execute yarn --prettier -w CHANGELOG.md after updating it. WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being autogenerated I think it's cool to ignore it

@yamal-alm yamal-alm marked this pull request as ready for review June 26, 2026 11:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new WebView Bridge API surface for initiating push-notification subscription/unsubscription flows from web code, backing it with new bridge message types, documentation, and tests, as requested in issue #275.

Changes:

  • Introduces subscribeToPushNotifications() / unsubscribeFromPushNotifications() web APIs that call the native bridge with SUBSCRIBE_TO_PUSH_NOTIFICATIONS / UNSUBSCRIBE_FROM_PUSH_NOTIFICATIONS.
  • Extends ResponsesFromNativeApp typing to include the two new message types.
  • Adds Jest tests and README docs for the new APIs; exports them from the package entrypoint.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/push-notifications.ts Adds the new push subscription/unsubscription wrapper functions over postMessageToNativeApp.
src/post-message.ts Adds response type entries for the two new bridge message types.
src/tests/push-notifications-test.ts Adds tests for success and error scenarios for both methods.
README.md Documents the two new APIs and their error cases.
index.ts Exposes the new APIs from the package root.
.prettierignore Normalizes /coverage entry and ignores CHANGELOG.md.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/push-notifications.ts
Comment thread src/push-notifications.ts
Comment thread index.ts
@yamal-alm yamal-alm merged commit 9d09931 into master Jun 29, 2026
4 of 5 checks passed
@yamal-alm yamal-alm deleted the push-subscription-methods branch June 29, 2026 07:43
@tuentisre

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 5.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants