Skip to content
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

fix: Invalid push notification tokens are not cleaned up from database for FCM API v2 #9173

Merged

Conversation

mtrezza
Copy link
Member

@mtrezza mtrezza commented Jul 1, 2024

Pull Request

Issue

Closes: #9085

Approach

The references on how to manage the token responses:

Tokens will be cleaned up in the following cases:

  • messaging/registration-token-not-registered
  • messaging/invalid-registration-token
  • messaging/invalid-argument but only if error message is The registration token is not a valid FCM registration token --> I tested this out; this error response is received if the token format itself is invalid, for example a token value of invalid_test_token

Tasks

  • Add tests

Copy link

parse-github-assistant bot commented Jul 1, 2024

Thanks for opening this pull request!

@mtrezza mtrezza changed the title fix: Invalid FCM push notification tokens are not removed from database fix: Invalid push notification tokens are not cleaned up from database for FCM API v2 Jul 1, 2024
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.14%. Comparing base (b645263) to head (9b060a8).
Report is 1 commits behind head on alpha.

Files Patch % Lines
src/StatusHandler.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            alpha    #9173      +/-   ##
==========================================
- Coverage   94.15%   94.14%   -0.01%     
==========================================
  Files         186      186              
  Lines       14727    14729       +2     
==========================================
+ Hits        13866    13867       +1     
- Misses        861      862       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mtrezza mtrezza merged commit 284da09 into parse-community:alpha Jul 1, 2024
19 of 26 checks passed
parseplatformorg pushed a commit that referenced this pull request Jul 1, 2024
# [7.1.0-alpha.13](7.1.0-alpha.12...7.1.0-alpha.13) (2024-07-01)

### Bug Fixes

* Invalid push notification tokens are not cleaned up from database for FCM API v2 ([#9173](#9173)) ([284da09](284da09))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.1.0-alpha.13

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Jul 1, 2024
@mtrezza mtrezza deleted the fix/remove-invalid-fcm-tokens branch July 1, 2024 19:47
parseplatformorg pushed a commit that referenced this pull request Jul 9, 2024
# [7.2.0-beta.1](7.1.0...7.2.0-beta.1) (2024-07-09)

### Bug Fixes

* Invalid push notification tokens are not cleaned up from database for FCM API v2 ([#9173](#9173)) ([284da09](284da09))

### Features

* Add support for dot notation on array fields of Parse Object ([#9115](#9115)) ([cf4c880](cf4c880))
* Upgrade to @parse/push-adapter 6.4.0 ([#9182](#9182)) ([ef1634b](ef1634b))
* Upgrade to Parse JS SDK 5.3.0 ([#9180](#9180)) ([dca187f](dca187f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.2.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Jul 9, 2024
parseplatformorg pushed a commit that referenced this pull request Jul 9, 2024
# [7.2.0](7.1.0...7.2.0) (2024-07-09)

### Bug Fixes

* Invalid push notification tokens are not cleaned up from database for FCM API v2 ([#9173](#9173)) ([284da09](284da09))

### Features

* Add support for dot notation on array fields of Parse Object ([#9115](#9115)) ([cf4c880](cf4c880))
* Upgrade to @parse/push-adapter 6.4.0 ([#9182](#9182)) ([ef1634b](ef1634b))
* Upgrade to Parse JS SDK 5.3.0 ([#9180](#9180)) ([dca187f](dca187f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.2.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove unregistered FCM tokens
2 participants