-
Notifications
You must be signed in to change notification settings - Fork 12
Add possibility to provide a locale when registering push token, make sure to not miss the last notification interaction and get expo push token if has permissions on boot #808
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: main
Are you sure you want to change the base?
Conversation
If not tap might be missed
|
|
@sync is attempting to deploy a commit to the Knock Team on Vercel. A member of the Team first needs to authorize it. |
packages/expo/src/modules/push/KnockExpoPushNotificationProvider.tsx
Outdated
Show resolved
Hide resolved
| }; | ||
|
|
||
| fetchExpoTokenIfNeeded(); | ||
| }, []); |
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.
address issue when you want to manually call registerPushTokenToChannel and your user already has granted those permissions, if not the expoPushToken from the provider will be undefined till you call registerForPushNotifications
| "interacted", | ||
| ); | ||
| notificationTappedHandler(response); | ||
| } |
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.
It's how expo recommend handling the initial push notifications: https://docs.expo.dev/versions/latest/sdk/notifications/#handle-push-notifications-with-navigation
| registerPushTokenToChannel( | ||
| token: string, | ||
| channelId: string, | ||
| locale?: string, |
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.
the locale in our app can be overridden (not system wide) and at the moment there is no way to tell knock about the custom user's locale
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.
Looks reasonable.
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.
let me know if you want me to split this pr into multiple
| "expo": "~53.0.22", | ||
| "expo-constants": "~17.1.7", | ||
| "expo-device": "^7.1.4", | ||
| "expo-network": "^8.0.0", |
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.
it's probably a breaking change
Description
We have started relying on knock and are faced with some "issues" with the current sdk, wondering if you would be interested in applying some of those fixes?
Checklist