mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-07 11:56:08 +08:00
bark 推送增加 archive 参数
This commit is contained in:
parent
e9852a0002
commit
0b52e05af8
|
@ -58,6 +58,7 @@ export class BarkNotification extends NotificationBaseInfo {
|
||||||
public barkGroup = 'qinglong';
|
public barkGroup = 'qinglong';
|
||||||
public barkLevel = 'active';
|
public barkLevel = 'active';
|
||||||
public barkUrl = '';
|
public barkUrl = '';
|
||||||
|
public barkArchive=""
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TelegramBotNotification extends NotificationBaseInfo {
|
export class TelegramBotNotification extends NotificationBaseInfo {
|
||||||
|
|
|
@ -196,8 +196,15 @@ export default class NotificationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private async bark() {
|
private async bark() {
|
||||||
let { barkPush, barkIcon, barkSound, barkGroup, barkLevel, barkUrl } =
|
let {
|
||||||
this.params;
|
barkPush,
|
||||||
|
barkIcon = '',
|
||||||
|
barkSound = '',
|
||||||
|
barkGroup = '',
|
||||||
|
barkLevel = '',
|
||||||
|
barkUrl = '',
|
||||||
|
barkArchive = '',
|
||||||
|
} = this.params;
|
||||||
if (!barkPush.startsWith('http')) {
|
if (!barkPush.startsWith('http')) {
|
||||||
barkPush = `https://api.day.app/${barkPush}`;
|
barkPush = `https://api.day.app/${barkPush}`;
|
||||||
}
|
}
|
||||||
|
@ -205,8 +212,7 @@ export default class NotificationService {
|
||||||
this.title,
|
this.title,
|
||||||
)}/${encodeURIComponent(
|
)}/${encodeURIComponent(
|
||||||
this.content,
|
this.content,
|
||||||
)}?icon=${barkIcon}&sound=${barkSound}&group=${barkGroup}&level=${barkLevel}&url=${barkUrl}`;
|
)}?icon=${barkIcon}&sound=${barkSound}&group=${barkGroup}&level=${barkLevel}&url=${barkUrl}&isArchive=${barkArchive}`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res: any = await got
|
const res: any = await got
|
||||||
.get(url, {
|
.get(url, {
|
||||||
|
|
|
@ -33,12 +33,12 @@ file_task_sample=$dir_sample/task.sample.sh
|
||||||
file_extra_sample=$dir_sample/extra.sample.sh
|
file_extra_sample=$dir_sample/extra.sample.sh
|
||||||
file_notify_js_sample=$dir_sample/notify.js
|
file_notify_js_sample=$dir_sample/notify.js
|
||||||
file_notify_py_sample=$dir_sample/notify.py
|
file_notify_py_sample=$dir_sample/notify.py
|
||||||
file_test_js_sample=$dir_sample/test.js
|
file_test_js_sample=$dir_sample/ql_sample.js
|
||||||
file_test_py_sample=$dir_sample/test.py
|
file_test_py_sample=$dir_sample/ql_sample.py
|
||||||
file_notify_py=$dir_scripts/notify.py
|
file_notify_py=$dir_scripts/notify.py
|
||||||
file_notify_js=$dir_scripts/sendNotify.js
|
file_notify_js=$dir_scripts/sendNotify.js
|
||||||
file_test_js=$dir_scripts/test.js
|
file_test_js=$dir_scripts/ql_sample.js
|
||||||
file_test_py=$dir_scripts/test.py
|
file_test_py=$dir_scripts/ql_sample.py
|
||||||
nginx_app_conf=$dir_root/docker/front.conf
|
nginx_app_conf=$dir_root/docker/front.conf
|
||||||
nginx_conf=$dir_root/docker/nginx.conf
|
nginx_conf=$dir_root/docker/nginx.conf
|
||||||
dep_notify_py=$dir_dep/notify.py
|
dep_notify_py=$dir_dep/notify.py
|
||||||
|
|
|
@ -357,6 +357,7 @@
|
||||||
"BARK推送消息的分组,默认为qinglong": "BARK push message grouping, default is qinglong",
|
"BARK推送消息的分组,默认为qinglong": "BARK push message grouping, default is qinglong",
|
||||||
"BARK推送消息的时效性,默认为active": "BARK push message redirecting URL",
|
"BARK推送消息的时效性,默认为active": "BARK push message redirecting URL",
|
||||||
"BARK推送消息的跳转URL": "BARK push message grouping, default is qinglong",
|
"BARK推送消息的跳转URL": "BARK push message grouping, default is qinglong",
|
||||||
|
"BARK是否保存推送消息": "Does BARK save push messages",
|
||||||
"telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw": "Telegram Bot token, e.g., 1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw",
|
"telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw": "Telegram Bot token, e.g., 1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw",
|
||||||
"telegram用户的id,例如:129xxx206": "Telegram user ID, e.g., 129xxx206",
|
"telegram用户的id,例如:129xxx206": "Telegram user ID, e.g., 129xxx206",
|
||||||
"代理IP": "Proxy IP",
|
"代理IP": "Proxy IP",
|
||||||
|
|
|
@ -357,6 +357,7 @@
|
||||||
"BARK推送消息的分组,默认为qinglong": "BARK推送消息的分组,默认为qinglong",
|
"BARK推送消息的分组,默认为qinglong": "BARK推送消息的分组,默认为qinglong",
|
||||||
"BARK推送消息的时效性,默认为active": "BARK推送消息的时效性,默认为active",
|
"BARK推送消息的时效性,默认为active": "BARK推送消息的时效性,默认为active",
|
||||||
"BARK推送消息的跳转URL": "BARK推送消息的跳转URL",
|
"BARK推送消息的跳转URL": "BARK推送消息的跳转URL",
|
||||||
|
"BARK是否保存推送消息": "BARK是否保存推送消息",
|
||||||
"telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw": "telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw",
|
"telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw": "telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw",
|
||||||
"telegram用户的id,例如:129xxx206": "telegram用户的id,例如:129xxx206",
|
"telegram用户的id,例如:129xxx206": "telegram用户的id,例如:129xxx206",
|
||||||
"代理IP": "代理IP",
|
"代理IP": "代理IP",
|
||||||
|
|
|
@ -190,6 +190,10 @@ export default {
|
||||||
label: 'barkUrl',
|
label: 'barkUrl',
|
||||||
tip: intl.get('BARK推送消息的跳转URL'),
|
tip: intl.get('BARK推送消息的跳转URL'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'barkArchive',
|
||||||
|
tip: intl.get('BARK是否保存推送消息'),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
telegramBot: [
|
telegramBot: [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user