diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-12 00:17:54 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-12 00:17:54 +1000 |
commit | de15b3a9a4803d070df06b3cf040830000fb85ec (patch) | |
tree | 995f2f7185dc59a1e7c35c6ea0fc725fc777cf8c /util/src/entities/Message.ts | |
parent | Primitive banned words blocking (diff) | |
download | server-de15b3a9a4803d070df06b3cf040830000fb85ec.tar.xz |
Allow empty content through block list
Diffstat (limited to 'util/src/entities/Message.ts')
-rw-r--r-- | util/src/entities/Message.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts index 78888e17..6ea5c4aa 100644 --- a/util/src/entities/Message.ts +++ b/util/src/entities/Message.ts @@ -117,7 +117,7 @@ export class Message extends BaseClass { content?: string; setContent(val: string) { - if (BannedWords.find(val)) throw new HTTPError("Message was blocked by automatic moderation", 200000); + if (val && BannedWords.find(val)) throw new HTTPError("Message was blocked by automatic moderation", 200000); this.content = val; } |