make word mutes case insensitive (close #10724)
This commit is contained in:
parent
81c97b3749
commit
b84a10a6ec
2 changed files with 6 additions and 2 deletions
|
@ -33,7 +33,9 @@ function checkWordMute(
|
||||||
|
|
||||||
if (
|
if (
|
||||||
keywords.length > 0 &&
|
keywords.length > 0 &&
|
||||||
keywords.every((keyword) => text.includes(keyword))
|
keywords.every((keyword) =>
|
||||||
|
text.toLowerCase().includes(keyword.toLowerCase()),
|
||||||
|
)
|
||||||
)
|
)
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -26,7 +26,9 @@ function checkWordMute(
|
||||||
|
|
||||||
if (
|
if (
|
||||||
keywords.length > 0 &&
|
keywords.length > 0 &&
|
||||||
keywords.every((keyword) => text.includes(keyword))
|
keywords.every((keyword) =>
|
||||||
|
text.toLowerCase().includes(keyword.toLowerCase()),
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
result.muted = true;
|
result.muted = true;
|
||||||
result.matched.push(...keywords);
|
result.matched.push(...keywords);
|
||||||
|
|
Loading…
Reference in a new issue