From 74b050032dbe224612711ca391370db9dc75a90a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Sat, 3 Jan 2026 14:09:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=84=E7=90=86=E9=80=9A=E7=9F=A5not?= =?UTF-8?q?ice=E6=B6=88=E6=81=AF=E7=9A=84=E6=97=B6=E5=80=99=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E6=98=AF=E5=90=A6=E5=9C=A8=E7=BE=A4=E8=81=8A=E7=99=BD?= =?UTF-8?q?=E5=90=8D=E5=8D=95=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/recv_handler/notice_handler.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/recv_handler/notice_handler.py b/src/recv_handler/notice_handler.py index 1c9ea5d..ccfc633 100644 --- a/src/recv_handler/notice_handler.py +++ b/src/recv_handler/notice_handler.py @@ -142,21 +142,29 @@ class NoticeHandler: handled_message, user_info = await self.handle_group_upload_notify(raw_message, group_id, user_id) system_notice = True case NoticeType.group_increase: + if not await message_handler.check_allow_to_chat(user_id, group_id, True, False): + return None sub_type = raw_message.get("sub_type") logger.info(f"处理群成员增加: {sub_type}") handled_message, user_info = await self.handle_group_increase_notify(raw_message, group_id, user_id) system_notice = True case NoticeType.group_decrease: + if not await message_handler.check_allow_to_chat(user_id, group_id, True, False): + return None sub_type = raw_message.get("sub_type") logger.info(f"处理群成员减少: {sub_type}") handled_message, user_info = await self.handle_group_decrease_notify(raw_message, group_id, user_id) system_notice = True case NoticeType.group_admin: + if not await message_handler.check_allow_to_chat(user_id, group_id, True, False): + return None sub_type = raw_message.get("sub_type") logger.info(f"处理群管理员变动: {sub_type}") handled_message, user_info = await self.handle_group_admin_notify(raw_message, group_id, user_id) system_notice = True case NoticeType.essence: + if not await message_handler.check_allow_to_chat(user_id, group_id, True, False): + return None sub_type = raw_message.get("sub_type") logger.info(f"处理精华消息: {sub_type}") handled_message, user_info = await self.handle_essence_notify(raw_message, group_id)