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

Add default value to legacy notification types #1986

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

jinliu9508
Copy link
Contributor

@jinliu9508 jinliu9508 commented Feb 8, 2024

Description

One Line Summary

Add default value to legacy notification types

Details

Motivation

Fix a bug that causes a "value not found" exception when trying to read the value of notification_types from the legacy user json string.

Testing

This PR contains 3 commits. The first commit simulates a crash scenario whose error track is identical from that reported by other users. The second commit applies a fix that prevents the crash. And the third commit is the final code change.
image

Other

It appears that this issue occurs only on devices that already have a legacy player ID. In the event that such a scenario persists after this fix, the corrupted push subscription will be opted in with a status of NO_PERMISSION.

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

Copy link
Member

@jkasten2 jkasten2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add details to the PR of how this was tested

@jinliu9508 jinliu9508 force-pushed the Add_default_value_for_notification_types branch from 0603376 to 37edcdb Compare February 9, 2024 05:01
@jinliu9508 jinliu9508 force-pushed the Add_default_value_for_notification_types branch from 37edcdb to cab7cb1 Compare February 9, 2024 05:43
Copy link
Member

@jkasten2 jkasten2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for testing to confirm the fix

@jinliu9508 jinliu9508 merged commit 07660f6 into main Feb 9, 2024
1 of 2 checks passed
@jinliu9508 jinliu9508 deleted the Add_default_value_for_notification_types branch February 9, 2024 17:44
@jinliu9508 jinliu9508 mentioned this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants