mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-28 06:22:33 +00:00
7 lines
222 B
TypeScript
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);
|