summary refs log tree commit diff
path: root/api/src/routes/channels/#channel_id/messages/index.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-01-12 01:27:55 +1100
committerGitHub <noreply@github.com>2022-01-11 17:27:55 +0300
commita30a0df246fc7b2165ef62568bfe40c57ddd8207 (patch)
treee99dde9501dd4c77a01259d4a9d6e37a469cff3d /api/src/routes/channels/#channel_id/messages/index.ts
parentUpdate role-icons.ts (diff)
downloadserver-a30a0df246fc7b2165ef62568bfe40c57ddd8207.tar.xz
Message fixes | Character limits and embed fixes (#581)
* Adds message character limits (#503)
* Fixed message `embeds` being ignored for `embed`
* Update Message.ts

Co-authored-by: Erkin Alp Güney <erkinalp9035@gmail.com>
Diffstat (limited to 'api/src/routes/channels/#channel_id/messages/index.ts')
-rw-r--r--api/src/routes/channels/#channel_id/messages/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts
index b2fb615c..c3d3d408 100644
--- a/api/src/routes/channels/#channel_id/messages/index.ts
+++ b/api/src/routes/channels/#channel_id/messages/index.ts
@@ -172,7 +172,7 @@ router.post(
 		}
 		const channel = await Channel.findOneOrFail({ where: { id: channel_id }, relations: ["recipients", "recipients.user"] });
 
-		const embeds = [];
+		const embeds = body.embeds || [];
 		if (body.embed) embeds.push(body.embed);
 		let message = await handleMessage({
 			...body,