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.
仿照其他的通知方式,添加了 ntfy 的通知方式。
通知方式的选项里添加 ntfy 选项,chat id 填入要推送的 url, token 就填 ntfy 的账号的 token 即可。
由于中文 post 上去会失败,所以这里对可能包含中文的地方用 utf-8 编码了下。
这里的 data 直接用 str 的原因为不改动原来接口。要让 ntfy 识别为 data 为 json,推送的 url 里面不能包含 topic。当前设计是在 chatid 处填入包含 topic 的 url,自己手工分离 topic 出来过于麻烦,故直接传了 str 当 data。
自己测了下功能正常

