mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-07-01 00:51:36 +00:00
Hmm, well aprt from the obvious.
bleh. it probably
This commit is contained in:
parent
0ad35e43fe
commit
9a590244d1
|
@ -83,7 +83,7 @@ export class WordList extends Protection {
|
|||
return
|
||||
}
|
||||
}
|
||||
if (this.badWords == null) {
|
||||
if (this.badWords === null) {
|
||||
// Create a mega-regex from all the tiny baby regexs
|
||||
try {
|
||||
this.badWords = new RegExp(
|
||||
|
@ -93,7 +93,7 @@ export class WordList extends Protection {
|
|||
} catch (ex) {
|
||||
await mjolnir.logMessage(LogLevel.ERROR, "WordList", `Could not produce a regex from the word list:\n${ex}.`)
|
||||
}
|
||||
}-
|
||||
}
|
||||
|
||||
// Perform the test
|
||||
if (message && this.badWords!.test(message)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user