add option priority for gotify

This commit is contained in:
jimmygao 2022-08-20 09:49:22 +08:00
parent 1a8d77d850
commit b2d313ace8
2 changed files with 3 additions and 1 deletions

View File

@ -39,3 +39,4 @@ token=ssXXX
[gotify]
api_url=http://xxx.xxx.cn
token=AMxxxx
priority=7

View File

@ -155,7 +155,8 @@ def gotify(status, push_message):
headers={"Content-Type": "application/json; charset=utf-8"},
json={
"title": title(status),
"message": push_message
"message": push_message,
"priority": cfg.getint("gotify", "priority")
}
).json()
log.info(f"推送结果:{rep.get('errmsg')}")