-
Notifications
You must be signed in to change notification settings - Fork 359
Fallback to the default push gateway on error #5742
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
base: develop
Are you sure you want to change the base?
Conversation
Fix Push notifications with Mozilla's autopush that returns 406
|
Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5742 +/- ##
===========================================
- Coverage 79.71% 79.71% -0.01%
===========================================
Files 2422 2422
Lines 65059 65067 +8
Branches 8303 8304 +1
===========================================
+ Hits 51861 51866 +5
- Misses 10225 10229 +4
+ Partials 2973 2972 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bmarty
left a comment
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.
Thanks, just a question, see the other comment
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.
Maybe instead of patching the code here, gatewayResult.gateway could contains the value of defaultPushGatewayHttpUrlProvider.provide()?
I am confused since we decided to provide the customUrl to the Error class in the past. Have we changed our mind?
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.
It used to return the default gateway: 2037065#diff-54db23386c84f03ffe631a6af4461af92d353f352f1b23025f14875d1175a0b4R49
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.
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.
I don't know if the toast is a good idea, some users are already confused that the gateway isn't their push server, and it may add more confusion
There are some action regarding the webpush MSC, I hope this gateway will be an old story soon :)
Content
Based on #5741.
Fallback to the default gateway if the discovery request returns an error and no gateway was recorded for the push server yet.
Motivation and context
We have the issue #5723 because the gateway resolver uses the custom gateway by default, when the request fails and the push server doesn't have any gateway yet. This exact issue is fixed with #5741 because 406 is included in valid responses showing no gateway is available. But we wouldn't have that issue if the fallback was to the default gateway.
I have split the 2 patchs in 2 PR, because I may not be aware of a need that let you choose to fallback to the custom gateway instead of the default, and I don't want to block the other patch.
Tests
Tested devices
Checklist