From 6cd0b4198f5d4ea48aad9acc0cd9f3234db1fe2b Mon Sep 17 00:00:00 2001 From: Akimio521 Date: Sun, 25 Feb 2024 15:14:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample/notify.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sample/notify.py b/sample/notify.py index 7526f055..39198945 100644 --- a/sample/notify.py +++ b/sample/notify.py @@ -444,14 +444,15 @@ def qmsg_bot(title: str, content: str, **kwargs) -> None: print(f'qmsg 推送失败!{response["reason"]}') -def wecom_app(title: str, content: str) -> None: +def wecom_app(title: str, content: str, **kwargs) -> None: """ 通过 企业微信 APP 推送消息。 """ - if not push_config.get("QYWX_AM"): + if not (kwargs.get("QYWX_AM") or push_config.get("QYWX_AM")): print("QYWX_AM 未设置!!\n取消推送") return - QYWX_AM_AY = re.split(",", push_config.get("QYWX_AM")) + QYWX_AM = kwargs.get("QYWX_AM", push_config.get("QYWX_AM")) + QYWX_AM_AY = re.split(",", QYWX_AM) if 4 < len(QYWX_AM_AY) > 5: print("QYWX_AM 设置错误!!\n取消推送") return