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 | 96c8c854ca14b6c694cbdb71c13846153511a17d (patch) | |
tree | e8c639e6b614b64d5e02adcd1842ecf2d30ff213 /api/src | |
parent | Revert ascending order thing (diff) | |
download | server-96c8c854ca14b6c694cbdb71c13846153511a17d.tar.xz |
Attempt to fix message ID bug
Diffstat (limited to 'api/src')
-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); |