make word mutes case insensitive (close #10724)

This commit is contained in:
naskya 2023-09-10 05:00:06 +09:00
parent 81c97b3749
commit b84a10a6ec
No known key found for this signature in database
GPG key ID: 164DFF24E2D40139
2 changed files with 6 additions and 2 deletions

View file

@ -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 {

View file

@ -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);