diff --git a/src/shared.ts b/src/shared.ts index c7f22eb..98de357 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -650,6 +650,7 @@ export async function BlockBlueVerified(user: BlueBlockerUser, config: Config) { const disallowedWordsWithoutEmptyStrings = config.disallowedWords.filter(word => word !== ''); if (disallowedWordsWithoutEmptyStrings.length > 0){ // this makes extra sure that emojis are always detected, regardless if they are attached to a word or another string of emojis. + // the 'i' makes the test case insensitive, which helps users not have to worry about typing the same word multiple times with different variations. const disallowedWordsAndEmojis = new RegExp(config.disallowedWords.join('|'), 'i'); const wordsInUserName = user.legacy.name.toLocaleLowerCase().split(/\s+/); for (const word of wordsInUserName) {