修复自动钓鱼状态与播报屏蔽范围
This commit is contained in:
@@ -585,9 +585,13 @@ export function appendMessage(msg, renderBatch = null) {
|
||||
}
|
||||
|
||||
const isMe = msg.from_user === window.chatContext?.username;
|
||||
// 系统播报屏蔽只作用于公屏窗口;自己相关消息仍要进入包厢窗口,避免屏蔽误伤个人提示。
|
||||
const isIdiomWinnerHistory = msg.action === "idiom_result" && msg.winner_username === window.chatContext?.username;
|
||||
const isRelatedToMe = isMe || msg.is_secret || msg.to_user === window.chatContext?.username || isIdiomWinnerHistory;
|
||||
const fontColor = msg.font_color || "#000000";
|
||||
const blockRuleKey = resolveBlockedSystemSenderKey(msg);
|
||||
const shouldHideByBlock = blockRuleKey ? state.blockedSystemSenders.has(blockRuleKey) : false;
|
||||
const shouldApplyBlockRule = Boolean(blockRuleKey && !isRelatedToMe);
|
||||
const shouldHideByBlock = shouldApplyBlockRule ? state.blockedSystemSenders.has(blockRuleKey) : false;
|
||||
|
||||
const div = document.createElement("div");
|
||||
div.className = "msg-line";
|
||||
@@ -598,7 +602,7 @@ export function appendMessage(msg, renderBatch = null) {
|
||||
div.dataset.idiomRoundId = String(idiomRoundId);
|
||||
div.dataset.quizRoundId = String(idiomRoundId);
|
||||
}
|
||||
if (blockRuleKey) {
|
||||
if (shouldApplyBlockRule) {
|
||||
div.dataset.blockKey = blockRuleKey;
|
||||
}
|
||||
|
||||
@@ -848,10 +852,6 @@ export function appendMessage(msg, renderBatch = null) {
|
||||
removeSameWelcome(renderBatch?.privateFragment);
|
||||
}
|
||||
|
||||
// 路由规则:公众窗口(say1) — 别人的公聊消息;包厢窗口(say2) — 自己发的 + 悄悄话 + 对自己说的
|
||||
const isIdiomWinnerHistory = msg.action === "idiom_result" && msg.winner_username === window.chatContext?.username;
|
||||
const isRelatedToMe = isMe || msg.is_secret || msg.to_user === window.chatContext?.username || isIdiomWinnerHistory;
|
||||
|
||||
// 存点通知标记
|
||||
const isAutoSave = (msg.from_user === "系统" || msg.from_user === "") &&
|
||||
msg.content && (msg.content.includes("自动存点") || msg.content.includes("手动存点"));
|
||||
|
||||
Reference in New Issue
Block a user