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