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)