summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-22 22:27:48 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-22 22:27:48 +1000
commit96c8c854ca14b6c694cbdb71c13846153511a17d (patch)
treee8c639e6b614b64d5e02adcd1842ecf2d30ff213 /api
parentRevert ascending order thing (diff)
downloadserver-96c8c854ca14b6c694cbdb71c13846153511a17d.tar.xz
Attempt to fix message ID bug
Diffstat (limited to 'api')
-rw-r--r--api/src/routes/channels/#channel_id/messages/index.ts3
1 files changed, 1 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 1e9b58ae..00e38239 100644
--- a/api/src/routes/channels/#channel_id/messages/index.ts
+++ b/api/src/routes/channels/#channel_id/messages/index.ts
@@ -102,12 +102,11 @@ 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: { timestamp: "DESC" },
 		take: limit,
 		where: { channel_id },
 		relations: ["author", "webhook", "application", "mentions", "mention_roles", "mention_channels", "sticker_items", "attachments"]
 	};
-	
 
 	if (after) {
 		if (after > new Snowflake()) return res.status(422);