fix: filter replies from public/local/hashtag timelines (Mastodon behavior)

This commit is contained in:
Ricardo
2026-03-31 19:56:32 +02:00
parent 5f023e4d26
commit 8d833bec89
+3 -1
View File
@@ -102,9 +102,10 @@ router.get("/api/v1/timelines/public", async (req, res, next) => {
const baseUrl = `${req.protocol}://${req.get("host")}`;
const limit = parseLimit(req.query.limit);
// Public timeline: only public visibility, no context items
// Public timeline: only public visibility, no context items, no replies
const baseFilter = {
isContext: { $ne: true },
inReplyTo: { $exists: false },
visibility: "public",
};
@@ -204,6 +205,7 @@ router.get("/api/v1/timelines/tag/:hashtag", async (req, res, next) => {
const baseFilter = {
isContext: { $ne: true },
inReplyTo: { $exists: false },
visibility: { $in: ["public", "unlisted"] },
category: hashtag,
};