From dc958d4765bb78b7d779a463a863c4d084d02a77 Mon Sep 17 00:00:00 2001 From: zhaoyingbo Date: Mon, 2 Dec 2024 03:23:15 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BF=87=E6=BB=A4=E6=8E=89=E8=A2=AB?= =?UTF-8?q?=E8=89=BE=E7=89=B9=E7=9A=84=E6=9C=BA=E5=99=A8=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/groupAgent/agent.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controller/groupAgent/agent.ts b/controller/groupAgent/agent.ts index 721360c..0fe74db 100644 --- a/controller/groupAgent/agent.ts +++ b/controller/groupAgent/agent.ts @@ -44,7 +44,9 @@ const agent = async (ctx: Context.Data) => { let userInput = rawMsgText for (const mention of mentions ?? []) { if (mention.id.user_id) { - userInput = userInput.replace(mention.key, mention.name) + userInput = userInput.replace(mention.key, `@${mention.name}`) + } else { + userInput = userInput.replace(mention.key, "") } }