-
Notifications
You must be signed in to change notification settings - Fork 1
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
[VIO-104] feat: Implement IAP (part 2) #1070
Conversation
ac1910c
to
36e3105
Compare
} | ||
} | ||
} | ||
``` |
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.
Why don't you use the cozy-stack API to send the notification? I don't know if it's a good thing to directly call fcm.
ac31a8e
to
4c2909f
Compare
4c2909f
to
a8c0d73
Compare
a8c0d73
to
48baad1
Compare
9c0e02b
to
733228d
Compare
log.debug('Received notification from onMessage event') | ||
|
||
if (!notification.notification?.title || !notification.notification.body) { | ||
log.error('Received a notification without title or body. Skip.') |
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.
log.error will go to sentry no ? Is it really needed ?
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.
Yes. This case should never happen, and if this happens I suppose we should warn the dev team using Sentry.
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.
Don't you think that one day it will ? Like tomorrow product team may decide that we want a notification with just a title ? And then every user who do not update will trigger the log.
733228d
to
4a3bfaa
Compare
flex: 1, | ||
backgroundColor: colors.primaryColor | ||
}, | ||
headerTextStyle: { |
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.
Wondering why we don't use our Typography component instead
4a3bfaa
to
7be686a
Compare
550277d
to
dbda917
Compare
dbda917
to
0cd2de4
Compare
When Android IAP is processed by the Cloudery, the Cozy's base domain is required to differentiate between test and production environments
This package is needed by the following commits to handle restart push notifications We target version `0.0.24` to ensure compatibility with react-native `0.66`
When the IAP is received by the Cloudery, it should change the Cozy's plan and then send a push notification to the user's apps This notification's goal is to tell the user that the Cozy's migration has been done, but also to restart the app when the user is ready to do it The app restart is required so we are sure all new plan related flags are applied
Google allows to get multiple subscription at the same time, so when the user upgrade or downgrade their offer, then we need to revoke the old one. To allow this we need to provide the `purchaseToken` to the request. This info is provided by the Cloudery using the `purchaseToken` query string Then we also need to specify how proration is calculated, the app does not make this choice, instead the Cloudery provide the info through the `prorationMode` query string
The stores require us to display localized prices and descriptions to the user when displaying IAP options So we want to provide them to the Cloudery using the `iap_offers` query parameter
When `isFlagship=true` is given to the OAuthClientsLimit route, then cozy-stacks will open links as new windows This was a requested feature to ease detection of cozy-app opening requests To handle this new behaviour we have to copy the interception code from `interceptNavigation` into `interceptOpenWindow`
We want to reduce noise in console logs and FlagshipUI changes are not so useful when not debuging this specific feature
0cd2de4
to
8a31cdf
Compare
This PR:
restart
push notifications