-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
feat: Add the ability to manage channels and send broadcasts #164
base: master
Are you sure you want to change the base?
Conversation
Thanks for opening this pull request! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #164 +/- ##
==========================================
+ Coverage 93.53% 95.24% +1.70%
==========================================
Files 23 23
Lines 588 820 +232
==========================================
+ Hits 550 781 +231
- Misses 38 39 +1 ☔ View full report in Codecov by Sentry. |
@mtrezza and @dplewis when you have a chance, can you do an initial review of this PR? To enable broadcasting, a larger amount of code changes are needed than normal, in particular because client.js hasn't been updated in 3+ years, was designed for original style push notifications (can only I have slowly integrated the changes needed to the client to support broadcasting and hopefully future proof it so changes can be added more easily with less code. The test cases have been updated with the async/await code, but all of the original tests still ensure their expected results. I still have test cases to add, but I don't expect much changes to To help guide you through the code changes (again, my apologies for the large PR), I recommend the following:
Open to any feedback/suggestions... |
@mtrezza the code for this is finished and ready for a full review. I still need to update some Markdown docs for usage of the new methods before merging |
Issue
Continuation of #163 which allowed the additional properties needed for broadcast notifications, but doesn't modify the Client API to
GET
,POST
,DELETE
to the respective Apple paths.Closes: #162
Closes: #146
Closes: #111
Approach
Follow the documentation related to channel management and broadcasting. This enables the functionality described in Apple's WWDC 2024 videos: Broadcast Updates to Your Live Activities.
The newly added API methods to
node-apn
will have the following footprint (TypeScript):Non-Breaking Changes
Changes are currently non-breaking as they are made to the client API, which isn't exposed to developers, adding new methods that weren't available. The typescript changes are improvements but are non-breaking as well.
I'll update this if a breaking change is required.