diff --git a/routes/message.js b/routes/message.js
index e28ba83..917ed5f 100644
--- a/routes/message.js
+++ b/routes/message.js
@@ -8,7 +8,7 @@ app.get("/:id", async (req, res) => {
const message = await MessageModel.get(req.params.id);
if (!message || (message.deleted && req.user && !req.user.admin)) return res.error( 404, "We have not got any message declared as this id.");
- res.redirect("/threads/" + message.threadID);
+ res.redirect("/threads/" + message.threadID+"?scroll="+req.params.id);
});
diff --git a/routes/threads.js b/routes/threads.js
index ad975d8..d24e722 100644
--- a/routes/threads.js
+++ b/routes/threads.js
@@ -39,7 +39,7 @@ app.get("/:id", async (req, res) => {
return user?.admin || !message?.deleted ? message : null;
}));
- res.render("thread", { thread, messages, user })
+ res.render("thread", { thread, messages, user,scroll:req.query.scroll || false });
} else
res.error( 404, "We have not got this thread.");
});
diff --git a/views/thread.ejs b/views/thread.ejs
index 2c7265e..7644175 100644
--- a/views/thread.ejs
+++ b/views/thread.ejs
@@ -48,10 +48,13 @@
<% }%>
+
<% if (user){ %>
<% }%>
-
+
<%- include("extra/footer") %>