From c2c3224a428d0b4fdc88a45a3867ae0b8c964b0e Mon Sep 17 00:00:00 2001 From: abearxiong Date: Thu, 8 Jan 2026 16:49:44 +0800 Subject: [PATCH] feat: update version to 0.0.3 and modify notify method to return boolean --- package.json | 2 +- src/notiify/feishu.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5a1a20a..0f5f659 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/notifier", - "version": "0.0.2", + "version": "0.0.3", "description": "", "main": "index.js", "basename": "/root/notifier", diff --git a/src/notiify/feishu.ts b/src/notiify/feishu.ts index d054b24..c500d66 100644 --- a/src/notiify/feishu.ts +++ b/src/notiify/feishu.ts @@ -11,7 +11,7 @@ export class FeishuNotifier implements Notification { this.webhook = config.webhook; } - async notify(message: string): Promise { + async notify(message: string): Promise { const payload = { msg_type: 'text', content: { @@ -28,7 +28,9 @@ export class FeishuNotifier implements Notification { }); if (!response.ok) { - throw new Error(`飞书推送失败: ${response.statusText}`); + console.error(`飞书推送失败: ${response.statusText}`); + return false; } + return true; } } \ No newline at end of file