-
-
Notifications
You must be signed in to change notification settings - Fork 70
feat: Allow 'widgets' in NotificationPushType #194
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
base: master
Are you sure you want to change the base?
feat: Allow 'widgets' in NotificationPushType #194
Conversation
|
🚀 Thanks for opening this pull request! |
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @index.d.ts:
- Line 270: The union type NotificationPushType includes an invalid value
'widgets'; remove 'widgets' from the NotificationPushType declaration so the
type union matches Apple APNs valid push types (alert, background, location,
voip, complication, fileprovider, mdm, liveactivity, pushtotalk). Also audit the
code that sets the apns-push-type header (the logic around pushType usage in
lib/notification/index.js) and, if needed, add validation to reject or map
unsupported values before sending to APNs so only documented types are allowed.
Required for sending Widget update notifications
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.
Test is missing
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #194 +/- ##
=======================================
Coverage 95.84% 95.84%
=======================================
Files 23 23
Lines 842 842
=======================================
Hits 807 807
Misses 35 35 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
As per Apple's documentation "widgets" is now a valid push type: https://developer.apple.com/documentation/widgetkit/updating-widgets-with-widgetkit-push-notifications
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.