summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--api/src/routes/channels/#channel_id/messages/index.ts4
1 files changed, 2 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 6c759cd7..849968f9 100644
--- a/api/src/routes/channels/#channel_id/messages/index.ts
+++ b/api/src/routes/channels/#channel_id/messages/index.ts
@@ -109,11 +109,11 @@ router.get("/", async (req: Request, res: Response) => {
 	};
 
 	if (after) {
-		if (after > Snowflake.generate()) return res.status(422);
+		if (BigInt(after) > BigInt(Snowflake.generate())) return res.status(422);
 		query.where.id = MoreThan(after);
 	}
 	else if (before) { 
-		if (before < req.params.channel_id) return res.status(422);
+		if (BigInt(before) < BigInt(req.params.channel_id)) return res.status(422);
 		query.where.id = LessThan(before);
 	}
 	else if (around) {