diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-17 18:45:42 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-17 18:45:42 +1100 |
commit | 444e81569018a71a1e50deef37419c4a2b10f3ef (patch) | |
tree | fefec776056da164b39f7165494b81e5667f41f8 /src/api/routes | |
parent | Remove /api/-/monitorz (diff) | |
download | server-444e81569018a71a1e50deef37419c4a2b10f3ef.tar.xz |
Remove bad banned words implementation
Diffstat (limited to 'src/api/routes')
-rw-r--r-- | src/api/routes/channels/#channel_id/messages/#message_id/index.ts | 5 | ||||
-rw-r--r-- | src/api/routes/channels/#channel_id/messages/index.ts | 5 |
2 files changed, 0 insertions, 10 deletions
diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts index 6fccac30..cd9da184 100644 --- a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts +++ b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts @@ -12,7 +12,6 @@ import { Snowflake, uploadFile, MessageCreateSchema, - BannedWords, DiscordApiErrors, } from "@fosscord/util"; import { Router, Response, Request } from "express"; @@ -44,10 +43,6 @@ router.patch( const { message_id, channel_id } = req.params; var body = req.body as MessageCreateSchema; - if (body.content) - if (BannedWords.find(body.content)) - throw DiscordApiErrors.AUTOMODERATOR_BLOCK; - const message = await Message.findOneOrFail({ where: { id: message_id, channel_id }, relations: ["attachments"], diff --git a/src/api/routes/channels/#channel_id/messages/index.ts b/src/api/routes/channels/#channel_id/messages/index.ts index ecbd1b19..4b935f19 100644 --- a/src/api/routes/channels/#channel_id/messages/index.ts +++ b/src/api/routes/channels/#channel_id/messages/index.ts @@ -15,7 +15,6 @@ import { Role, MessageCreateSchema, ReadState, - BannedWords, DiscordApiErrors, } from "@fosscord/util"; import { HTTPError } from "lambert-server"; @@ -192,10 +191,6 @@ router.post( var body = req.body as MessageCreateSchema; const attachments: Attachment[] = []; - if (body.content) - if (BannedWords.find(body.content)) - throw DiscordApiErrors.AUTOMODERATOR_BLOCK; - const channel = await Channel.findOneOrFail({ where: { id: channel_id }, relations: ["recipients", "recipients.user"], |