open-webui/src/lib/utils/channelNotifications.ts
Timothy Jaeryang Baek e5c80682b9 refac
2026-10-14 14:41:26 +04:00

7 lines
222 B
TypeScript

export const shouldNotifyChannelMessage = (
isMuted: boolean,
content: string,
userId: string
): boolean =>
!isMuted ||
Array.from(content.matchAll(/<@U:([^|>]+)(?:\|[^>]+)?>/g)).some((match) => match[1] === userId);