diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-07-22 22:27:48 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-07-22 22:27:48 +1000 |
commit | 9b9d7b7f3dd69dc24d4adc0f71e2b98feb98fd28 (patch) | |
tree | 69a254a42489bb6df431f7d3430c8c0bb2a21dcd /api | |
parent | Revert ascending order thing (diff) | |
download | server-9b9d7b7f3dd69dc24d4adc0f71e2b98feb98fd28.tar.xz |
Attempt to fix message ID bug
Diffstat (limited to 'api')
-rw-r--r-- | api/src/routes/channels/#channel_id/messages/index.ts | 3 |
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); |