summary refs log tree commit diff
path: root/api/src
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-22 22:11:02 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-22 22:11:02 +1000
commita6a2ba22fecf50728948d74edf4d330c9db99203 (patch)
tree2bc1a53360ce84ffd37bb75fbe7a33f0e3c98718 /api/src
parentRemove unnessesary async and close on error in gateway (diff)
downloadserver-a6a2ba22fecf50728948d74edf4d330c9db99203.tar.xz
Get messages by ascending order
Diffstat (limited to 'api/src')
-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 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<Message> & { 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"]