fix: restrict requireMentionInThread to topic-thread groups only

Plain quote-replies in normal groups also set threadReply=true (via
root_id), which would incorrectly bypass the mention gate. Now only
apply the thread override when the group is in topic-thread mode
(group_topic or group_topic_sender).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Strider 2026-03-20 07:53:31 +08:00
parent 1d0c37e820
commit 33da852ff1

View File

@ -414,7 +414,10 @@ export async function handleFeishuMessage(params: {
({ requireMention } = resolveFeishuReplyPolicy({
isDirectMessage: false,
isThreadReply: groupSession?.threadReply,
isThreadReply:
groupSession?.threadReply &&
(groupSession?.groupSessionScope === "group_topic" ||
groupSession?.groupSessionScope === "group_topic_sender"),
globalConfig: feishuCfg,
groupConfig,
}));