- 新增直播评论/上下文/礼物等 API 与回放组件 - 主播开播、云端推流配置与 streamer 校验 - 依赖与 Mongo 集合/种子更新 - 需求与调研文档补充 Made-with: Cursor
10 lines
393 B
TypeScript
10 lines
393 B
TypeScript
/** 直播场景默认违禁词(与 context API 一致,可后续迁至配置集合) */
|
|
export const DEFAULT_LIVE_FORBIDDEN_WORDS = ["赌博", "色情", "法轮功", "台独", "淫秽", "毒品"] as const
|
|
|
|
export function hitsLiveForbiddenWord(text: string, words: readonly string[]): string | null {
|
|
for (const w of words) {
|
|
if (w && text.includes(w)) return w
|
|
}
|
|
return null
|
|
}
|