Skip to content

Fix validation and add ntfy as notification adapter - #75

Merged
orangecoding merged 4 commits into
masterfrom
unknown repository
Apr 14, 2023
Merged

Fix validation and add ntfy as notification adapter#75
orangecoding merged 4 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Apr 6, 2023

Copy link
Copy Markdown

Add ntfy as notification adapter and there was a bug inside the validation of number input which is fixed. This fix was necessary to enable ntfy priority.

@orangecoding orangecoding left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks so much for your contribution. I did not even know about ntfy... 😱
Could you check the comments I made?

Comment thread lib/notification/adapter/ntfy.js Outdated
Comment thread lib/notification/adapter/ntfy.js Outdated
const message = utf8.encode(
`Address: ${newListing.address} Size: ${newListing.size.replace(/2m/g, '$m^2$')} Price: ${newListing.price}`
);
return fetch(url, {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

while I totally appreciate not to use a lib for a simple http call, in this case, it might make sense to use one.

I'm thinking about using this: https://github.com/cityssm/node-ntfy-publish

If you decide against this, at least please don't use utf8 as an external dependency, coz it's unmaintained (last update 6 years ago and tons of issues)

@ghost
ghost requested a review from orangecoding April 14, 2023 15:01
@orangecoding
orangecoding merged commit 46775c3 into orangecoding:master Apr 14, 2023
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.

1 participant