summary refs log tree commit diff
path: root/api/src/routes/channels/#channel_id/messages/index.ts
diff options
context:
space:
mode:
authorErkin Alp Güney <erkinalp9035@gmail.com>2022-04-18 21:21:40 +0300
committerErkin Alp Güney <erkinalp9035@gmail.com>2022-04-18 21:21:40 +0300
commit53ca3925bf09c6b00d62edc27d93560578a09c34 (patch)
tree8674ea14bf76f9e6cc5f67c7226acdc8f7fa58ef /api/src/routes/channels/#channel_id/messages/index.ts
parentreactions rights enforcement (diff)
downloadserver-53ca3925bf09c6b00d62edc27d93560578a09c34.tar.xz
get single message && message rights enforcement
Diffstat (limited to '')
-rw-r--r--api/src/routes/channels/#channel_id/messages/index.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts

index 2fd08b04..4cfaf247 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts
@@ -8,6 +8,7 @@ import { Embed, emitEvent, getPermission, + getRights, Message, MessageCreateEvent, uploadFile, @@ -149,7 +150,7 @@ const messageUpload = multer({ }); // max upload 50 mb // TODO: dynamically change limit of MessageCreateSchema with config -// TODO: check: sum of all characters in an embed structure must not exceed 6000 characters +// TODO: check: sum of all characters in an embed structure must not exceed instance limits // https://discord.com/developers/docs/resources/channel#create-message // TODO: text channel slowdown @@ -167,7 +168,7 @@ router.post( next(); }, - route({ body: "MessageCreateSchema", permission: "SEND_MESSAGES" }), + route({ body: "MessageCreateSchema", permission: "SEND_MESSAGES", right: "SEND_MESSAGES" }), async (req: Request, res: Response) => { const { channel_id } = req.params; var body = req.body as MessageCreateSchema;