Skip to content
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

feat: Add ntfy notification method #815

Open
wants to merge 1 commit into
base: 3.2-dev
Choose a base branch
from

Conversation

Ljxtt
Copy link

@Ljxtt Ljxtt commented Jul 23, 2024

仿照其他的通知方式,添加了 ntfy 的通知方式。
通知方式的选项里添加 ntfy 选项,chat id 填入要推送的 url, token 就填 ntfy 的账号的 token 即可。

由于中文 post 上去会失败,所以这里对可能包含中文的地方用 utf-8 编码了下。

这里的 data 直接用 str 的原因为不改动原来接口。要让 ntfy 识别为 data 为 json,推送的 url 里面不能包含 topic。当前设计是在 chatid 处填入包含 topic 的 url,自己手工分离 topic 出来过于麻烦,故直接传了 str 当 data。

自己测了下功能正常
微信图片编辑_20240723225117
微信截图_20240723212852

Copy link

vercel bot commented Jul 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auto-bangumi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2024 2:55pm

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