From 9c45f3e13e4250edaa4b9c4b04bc7bfdde8cd00d Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Wed, 8 Oct 2025 15:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=8F=AF=E4=BB=A5=E5=9C=A8?= =?UTF-8?q?=E4=B8=8D=E6=88=90=E4=B8=BA=E6=88=90=E5=91=98=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=E6=9F=A5=E7=9C=8B=E5=AF=B9=E8=AF=9D=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/api/ChatApi.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/api/ChatApi.ts b/server/api/ChatApi.ts index 19113e9..a55824b 100644 --- a/server/api/ChatApi.ts +++ b/server/api/ChatApi.ts @@ -40,10 +40,6 @@ export default class ChatApi extends BaseApi { code: 404, msg: "对话不存在", } - if (!UserChatLinker.checkUserIsLinkedToChat(token.author, chat!.bean.id)) return { - code: 403, - msg: "用户无权访问此对话", - } // 私聊 if (chat!.bean.type == 'private') { @@ -165,6 +161,7 @@ export default class ChatApi extends BaseApi { if (!UserChatLinker.checkUserIsLinkedToChat(token.author, chat!.bean.id)) return { code: 403, msg: "用户无权访问此对话", + caused_by: 'NOT_IN_THIS_CHAT_MEMBER_LIST', } return { @@ -253,7 +250,7 @@ export default class ChatApi extends BaseApi { * @param token 令牌 * @param target ID */ - this.registerEvent("Chat.requestToBeMemberOfGroup", (args, { deviceId }) => { + this.registerEvent("Chat.requestJoinGroup", (args, { deviceId }) => { if (this.checkArgsMissing(args, ['token', 'target'])) return { msg: "参数缺失", code: 400,