mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-04-10 23:15:51 +00:00
fix(notification): 系统通知豁免会话白/黑名单过滤
This commit is contained in:
@@ -116,8 +116,10 @@ export async function showNotification(data: any) {
|
||||
const filterMode = config.get("notificationFilterMode") || "all";
|
||||
const filterList = config.get("notificationFilterList") || [];
|
||||
const sessionId = typeof data.sessionId === "string" ? data.sessionId : "";
|
||||
// 系统通知(如 "WeFlow 准备就绪")不是聊天消息,不应受会话白/黑名单影响
|
||||
const isSystemNotification = sessionId.startsWith("weflow-");
|
||||
|
||||
if (filterMode !== "all") {
|
||||
if (!isSystemNotification && filterMode !== "all") {
|
||||
const isInList = sessionId !== "" && filterList.includes(sessionId);
|
||||
if (filterMode === "whitelist" && !isInList) {
|
||||
// 白名单模式:不在列表中则不显示(空列表视为全部拦截)
|
||||
|
||||
Reference in New Issue
Block a user