mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
fix message loading
This commit is contained in:
parent
11d65e42be
commit
3c9e48cbda
@ -71,9 +71,11 @@ router.get("/", async (req, res) => {
|
||||
id: { $gt: (BigInt(around) - BigInt(halfLimit)).toString(), $lt: (BigInt(around) + BigInt(halfLimit)).toString() }
|
||||
});
|
||||
else {
|
||||
query = MessageModel.find({ channel_id }).sort({ id: -1 });
|
||||
query = MessageModel.find({ channel_id });
|
||||
}
|
||||
|
||||
query = query.sort({ id: -1 });
|
||||
|
||||
const messages = await query.limit(limit).exec();
|
||||
|
||||
return res.json(
|
||||
|
Loading…
Reference in New Issue
Block a user