Skip to content

fix(ntfy): check if the message was really accepted - #7650

Open
dharunashokkumar wants to merge 1 commit into
louislam:masterfrom
dharunashokkumar:fix/ntfy-test-verify-response
Open

fix(ntfy): check if the message was really accepted#7650
dharunashokkumar wants to merge 1 commit into
louislam:masterfrom
dharunashokkumar:fix/ntfy-test-verify-response

Conversation

@dharunashokkumar

Copy link
Copy Markdown

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)
  • ⚠️ If there are Breaking change (a fix or feature that alters existing functionality in a way that could cause issues) I have called them out
  • 🧠 I have disclosed any use of LLMs/AI in this contribution and reviewed all generated content.
    I understand that I am responsible for and able to explain every line of code I submit.
  • 🔍 Any UI changes adhere to visual style of this project.
  • 🛠️ I have self-reviewed and self-tested my code to ensure it works as expected.
  • 📝 I have commented my code, especially in hard-to-understand areas (e.g., using JSDoc for methods).
  • 🤖 I added or updated automated tests where appropriate.
  • 📄 Documentation updates are included (if applicable).
  • 🧰 Dependency updates are listed and explained.
  • ⚠️ CI passes and is green.

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
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the PR! If anyone would like to help with testing, run: npx kuma-pr dharunashokkumar:fix/ntfy-test-verify-response (requires Node.js and Docker)

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.

[BETA] ntfy: test button does not verify if message is sent

1 participant