-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
[BREAK] Suspend push notifications when login token is invalidated #20913
Conversation
Once this change is merged, Rocket.Chat will no longer send notifications to old user sessions. Users will have to open the mobile app to start receiving notifications again. We should do something to prevent that. |
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.
Create a migration to update the existing push tokens with an expiration date (one week into the future) and a countdown of number of notifications.
When sending a push notification to a push token that doesn't have a login token we should validate this expiration date and continue sending notifications until the date is reached. After the expiration date we decrease the countdown number for each notification we send. Once the countdown reaches zero, we stop sending notifications to that token.
The raix:push-update method should also erase this expiration and countdown information when a push token is updated.
This way, we'll give users enough time to open the app and renew their push tokens without losing any notifications.
Proposed changes (including videos or screenshots)
link the auth token to the push token
Issue(s)
Steps to test or reproduce
Further comments