From bd7c361300f3dc06e14e24e56408753ddcd3301a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E9=87=8ESKY?= <87404327+FlyingFeng2021@users.noreply.github.com> Date: Thu, 11 Apr 2024 19:13:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=A3=9E=E4=B9=A6=20bot=20?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E8=BF=87=E7=A8=8B=EF=BC=8C=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=96=B0=E7=8A=B6=E6=80=81=E7=A0=81=20(#2302)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample/notify.js | 2 +- sample/notify.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/notify.js b/sample/notify.js index aafda168..9d17e16a 100644 --- a/sample/notify.js +++ b/sample/notify.js @@ -1121,7 +1121,7 @@ function fsBotNotify(text, desp) { console.log(err); } else { data = JSON.parse(data); - if (data.StatusCode === 0) { + if (data.StatusCode === 0 || data.code === 0) { console.log('飞书发送通知消息成功🎉\n'); } else { console.log(`${data.msg}\n`); diff --git a/sample/notify.py b/sample/notify.py index cbbc5ac5..f6358ede 100644 --- a/sample/notify.py +++ b/sample/notify.py @@ -224,7 +224,7 @@ def feishu_bot(title: str, content: str, **kwargs) -> None: data = {"msg_type": "text", "content": {"text": f"{title}\n\n{content}"}} response = requests.post(url, data=json.dumps(data)).json() - if response.get("StatusCode") == 0: + if response.get("StatusCode") == 0 or response.get("code") == 0: print("飞书 推送成功!") else: print("飞书 推送失败!错误信息如下:\n", response)