diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-08-02 19:10:34 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-08-02 19:10:34 +1000 |
commit | 268699823d41fba890413aa133b9aa8271b9c459 (patch) | |
tree | 884465f6dbb5e889ba38654421ee30eed3d38420 | |
parent | Respect invisible members (diff) | |
download | server-268699823d41fba890413aa133b9aa8271b9c459.tar.xz |
Fix messages?after=snowflake calling new Snowflake, which is not allwoed
-rw-r--r-- | api/src/routes/channels/#channel_id/messages/index.ts | 2 |
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 00e38239..6c759cd7 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts @@ -109,7 +109,7 @@ router.get("/", async (req: Request, res: Response) => { }; if (after) { - if (after > new Snowflake()) return res.status(422); + if (after > Snowflake.generate()) return res.status(422); query.where.id = MoreThan(after); } else if (before) { |