From f3c6b7d7a1932ff98ad3b2759d7f093d29b7362b Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Fri, 22 Jul 2022 22:11:02 +1000 Subject: [PATCH] Get messages by ascending order --- api/src/routes/channels/#channel_id/messages/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts index 1e9b58ae..f2dace17 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts @@ -102,7 +102,7 @@ router.get("/", async (req: Request, res: Response) => { if (!permissions.has("READ_MESSAGE_HISTORY")) return res.json([]); var query: FindManyOptions & { where: { id?: any; }; } = { - order: { id: "DESC" }, + order: { id: "ASC" }, take: limit, where: { channel_id }, relations: ["author", "webhook", "application", "mentions", "mention_roles", "mention_channels", "sticker_items", "attachments"]