From e06c3571a8eb2780fd149e89c699e3203150cadc Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sun, 31 May 2026 14:25:51 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20undefined=20error=20in=20serverNotify=20w?= =?UTF-8?q?hen=20Server=E9=85=B1=20returns=20error=20responses=20(#2917)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial plan * Fix: Replace data.data.errno with data.code to prevent undefined error Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --- sample/notify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/notify.js b/sample/notify.js index 2b4d91d3..6b6340a4 100644 --- a/sample/notify.js +++ b/sample/notify.js @@ -307,7 +307,7 @@ function serverNotify(text, desp) { console.log('Server 酱发送通知调用API失败😞\n', err); } else { // server酱和Server酱·Turbo版的返回json格式不太一样 - if (data.errno === 0 || data.data.errno === 0) { + if (data.errno === 0 || data.code === 0) { console.log('Server 酱发送通知消息成功🎉\n'); } else if (data.errno === 1024) { // 一分钟内发送相同的内容会触发