mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-01 03:25:04 +03:00
fixed scroll
This commit is contained in:
parent
71f820160d
commit
e2e2b5bf59
2 changed files with 1 additions and 2 deletions
|
@ -2,7 +2,6 @@ const UserModel = require("./User");
|
|||
const UserCache = [];
|
||||
|
||||
module.exports.getAuthor = async function () {
|
||||
console.log("User Cache Length:", UserCache.length);
|
||||
const id = this.authorID || this.author?.id;
|
||||
let user = UserCache.find(user => user?.id == id)
|
||||
if (!user) {
|
||||
|
|
|
@ -36,7 +36,7 @@ app.get("/:id/", async (req, res) => {
|
|||
.replaceAll("\n", "<br>");
|
||||
return await message.get_author();
|
||||
})));
|
||||
res.reply("thread", { page, thread, messages, scroll: req.query.scroll || thread.messages[0].id });
|
||||
res.reply("thread", { page, thread, messages, scroll: req.query.scroll || messages[0]?.id });
|
||||
|
||||
thread.save();
|
||||
|
||||
|
|
Loading…
Reference in a new issue