From 5a3405402429591d1382423802e9d3d82502b717 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sun, 19 Oct 2025 11:55:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=99=90=E5=88=B6=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E4=BB=BB=E6=84=8F=E7=A7=81=E8=81=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/api/ChatApi.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/api/ChatApi.ts b/server/api/ChatApi.ts index a55824b..28feaf6 100644 --- a/server/api/ChatApi.ts +++ b/server/api/ChatApi.ts @@ -43,6 +43,10 @@ export default class ChatApi extends BaseApi { // 私聊 if (chat!.bean.type == 'private') { + if (!UserChatLinker.checkUserIsLinkedToChat(token.author, chat!.bean.id)) return { + code: 403, + msg: "用户无权访问此对话", + } const mine = User.findById(token.author) as User return {