fix(ntfy): check if the message was really accepted - #7650
Open
dharunashokkumar wants to merge 1 commit into
Open
fix(ntfy): check if the message was really accepted#7650dharunashokkumar wants to merge 1 commit into
dharunashokkumar wants to merge 1 commit into
Conversation
The test button showed success for any 2xx response, so when a proxy redirected the publish to a login page it still said sent successfully but nothing arrived. ntfy returns the created message when a publish works, so fail if there is no id in the response. Fixes louislam#6050
Contributor
|
Thanks for the PR! If anyone would like to help with testing, run: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
the test button showed success for any 2** response, so when a proxy redirected the publish to a login page it still said sent successfully but nothing arrived.
ntfy returns the created message when a publish works, so fail if there is no id in the response.
breaking change
setups whose ntfy server url redirects will now report an
error instead of a false success. That is the intent of the fix, but it will
surface as new errors for anyone currently affected.
testing
-- confirmed a real ntfy.sh publish returns "id": "...", ..., and that the
message actually arrive....
-- reproduced the bug with a local server that answers post with a 302 to a login
page: on master this reports "Sent Successfully.", with this change it fails.
-- added notification-providers/test-ntfy.js
--eslint and prettier done on both files
I used an AI assistant to navigate the codebase and draft this change. I have
reviewed and tested it myself.
Resolves #6050
yup, I used an ai to navigate the code and draft the change, and i have reviewed and test it my self perfectly, and i am responsible to explain evert line of code i submit
Please follow this checklist to avoid unnecessary back and forth (click to expand)
I understand that I am responsible for and able to explain every line of code I submit.