From 3b75689bde8ad8ea6840e61f6c440cf3cb3c9d78 Mon Sep 17 00:00:00 2001 From: hukdoesn Date: Tue, 1 Jul 2025 10:38:28 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=85=8D=E7=BD=AE=E6=B5=8B=E8=AF=95webhook?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=87=AA=E5=AE=9A=E4=B9=89=E5=85=B3=E9=94=AE?= =?UTF-8?q?=E8=AF=8D=E5=8F=91=E9=80=81=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/apps/views/notification.py | 6 + web/src/views/system/Notification.vue | 476 -------------------------- 2 files changed, 6 insertions(+), 476 deletions(-) delete mode 100644 web/src/views/system/Notification.vue diff --git a/backend/apps/views/notification.py b/backend/apps/views/notification.py index 0f848aa..bcf5f82 100644 --- a/backend/apps/views/notification.py +++ b/backend/apps/views/notification.py @@ -320,6 +320,12 @@ class NotificationTestView(View): # 准备测试消息 timestamp = str(int(time.time() * 1000)) test_message = "这是一条测试消息,如果你收到了这条消息,说明机器人配置正确。" + + # 使用自定义关键词安全设置,需要在消息中包含关键词 + if robot.security_type == 'keyword' and robot.keywords: + # 测试消息中关键词 + keyword = robot.keywords[0] + test_message = f"【{keyword}】{test_message}" # 根据不同类型的机器人发送测试消息 try: diff --git a/web/src/views/system/Notification.vue b/web/src/views/system/Notification.vue deleted file mode 100644 index ded6a8e..0000000 --- a/web/src/views/system/Notification.vue +++ /dev/null @@ -1,476 +0,0 @@ - - - - - \ No newline at end of file