Attempt to fix message ID bug
This commit is contained in:
parent
18b25fc21c
commit
96c8c854ca
@ -102,13 +102,12 @@ router.get("/", async (req: Request, res: Response) => {
|
|||||||
if (!permissions.has("READ_MESSAGE_HISTORY")) return res.json([]);
|
if (!permissions.has("READ_MESSAGE_HISTORY")) return res.json([]);
|
||||||
|
|
||||||
var query: FindManyOptions<Message> & { where: { id?: any; }; } = {
|
var query: FindManyOptions<Message> & { where: { id?: any; }; } = {
|
||||||
order: { id: "DESC" },
|
order: { timestamp: "DESC" },
|
||||||
take: limit,
|
take: limit,
|
||||||
where: { channel_id },
|
where: { channel_id },
|
||||||
relations: ["author", "webhook", "application", "mentions", "mention_roles", "mention_channels", "sticker_items", "attachments"]
|
relations: ["author", "webhook", "application", "mentions", "mention_roles", "mention_channels", "sticker_items", "attachments"]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if (after) {
|
if (after) {
|
||||||
if (after > new Snowflake()) return res.status(422);
|
if (after > new Snowflake()) return res.status(422);
|
||||||
query.where.id = MoreThan(after);
|
query.where.id = MoreThan(after);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user