From bfc14777be918ec5d65e2806b132814d2576c287 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sun, 26 Oct 2025 14:24:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A3=80=E9=AA=8C=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E8=83=BD=E8=AF=B7=E6=B1=82=E5=8A=A0=E5=85=A5=E5=AF=B9=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/api/ChatApi.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/server/api/ChatApi.ts b/server/api/ChatApi.ts index 5b67193..9c5d10e 100644 --- a/server/api/ChatApi.ts +++ b/server/api/ChatApi.ts @@ -283,8 +283,16 @@ export default class ChatApi extends BaseApi { code: 404, msg: "对话不存在", } - - chat.addJoinRequest(token.author, args.reason as string) + if (chat.bean.type == 'group') { + const settings = ChatGroup.fromChat(chat).getSettings() + if (settings.settings.allow_new_member_join) + chat.addJoinRequest(token.author, args.reason as string) + else + return { + code: 403, + msg: "该对话不允许加入请求", + } + } return { code: 200,