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 (
keywords.length > 0 &&
keywords.every((keyword) => text.includes(keyword))
keywords.every((keyword) =>
text.toLowerCase().includes(keyword.toLowerCase()),
)
)
return true;
} else {

View File

@ -26,7 +26,9 @@ function checkWordMute(
if (
keywords.length > 0 &&
keywords.every((keyword) => text.includes(keyword))
keywords.every((keyword) =>
text.toLowerCase().includes(keyword.toLowerCase()),
)
) {
result.muted = true;
result.matched.push(...keywords);