消息通知 Bark 增加额外参数:时效性通知、跳转Url (#2112)

This commit is contained in:
zui-lang
2023-09-17 01:01:34 +08:00
committed by GitHub
parent acc7443004
commit aab096843c
7 changed files with 31 additions and 3 deletions
+2 -2
View File
@@ -195,7 +195,7 @@ export default class NotificationService {
}
private async bark() {
let { barkPush, barkIcon, barkSound, barkGroup } = this.params;
let { barkPush, barkIcon, barkSound, barkGroup, barkLevel, barkUrl } = this.params;
if (!barkPush.startsWith('http')) {
barkPush = `https://api.day.app/${barkPush}`;
}
@@ -203,7 +203,7 @@ export default class NotificationService {
this.title,
)}/${encodeURIComponent(
this.content,
)}?icon=${barkIcon}&sound=${barkSound}&group=${barkGroup}`;
)}?icon=${barkIcon}&sound=${barkSound}&group=${barkGroup}&level=${barkLevel}&url=${barkUrl}`;
try {
const res: any = await got