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

Don't attempt delivery of notification if we have rejected pushkey #315

Merged
merged 8 commits into from
Aug 2, 2022

Conversation

H-Shay
Copy link
Contributor

@H-Shay H-Shay commented Jul 26, 2022

Previously we decided to reject pushkeys if default_payload was malformed (i.e. not a dict) but went ahead and attempted delivery with the rejected pushkey anyway. This PR fixes that and changes the code so we do not attempt delivery with a pushkey we have rejected.

While I was in the area I also downgraded the logging error messages to a warning, to reduce sentry spam. This fixes #314. I also amended the warnings to give a little more information on why the pushkey was being rejected.

@H-Shay H-Shay requested a review from a team as a code owner July 26, 2022 17:57
sygnal/apnspushkin.py Outdated Show resolved Hide resolved
tests/test_gcm.py Show resolved Hide resolved
sygnal/gcmpushkin.py Outdated Show resolved Hide resolved
@H-Shay H-Shay requested a review from squahtx July 29, 2022 19:07
sygnal/apnspushkin.py Outdated Show resolved Hide resolved
@H-Shay H-Shay requested a review from squahtx August 1, 2022 17:31
Copy link
Contributor

@squahtx squahtx 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 making the changes!

@H-Shay H-Shay merged commit cac851b into main Aug 2, 2022
@H-Shay H-Shay deleted the shay/fix_error branch August 2, 2022 16:13
@H-Shay
Copy link
Contributor Author

H-Shay commented Aug 2, 2022

Merged, thanks for the review!

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.

"default_payload was misconfigured, this value must be a dict" error is noisy
2 participants