Skip to content

Commit 0b08b37

Browse files
committed
docs: clarify private ACL and bot-mark comments
1 parent de77cb9 commit 0b08b37

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/recv_handler/message_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ async def check_allow_to_chat(self, user_id: int, chat_id: Optional[int], chat_t
5757
logger.warning("群聊在聊天黑名单中,消息被丢弃")
5858
return False
5959
else:
60+
# 私聊 ACL 有意按发送者 user_id 过滤(与上游 main 当前行为保持一致)。
6061
if global_config.chat.private_list_type == "whitelist" and user_id not in global_config.chat.private_list:
6162
logger.warning("私聊不在聊天白名单中,消息被丢弃")
6263
return False
@@ -129,7 +130,7 @@ async def handle_update(self, update: Dict[str, Any]) -> None:
129130
logger.warning("处理后消息内容为空")
130131
return
131132
if is_from_bot:
132-
# 不拦截 bot 自发消息;但打标供上游(如需要)区分,避免业务侧误触发循环
133+
# 到达此处说明消息已通过 ACL;这里仅为 bot 自发消息打标,供上游按需区分
133134
additional_config["from_bot"] = True
134135

135136
submit_seg = Seg(type="seglist", data=seg_list)

0 commit comments

Comments
 (0)