fix: duplicated posts in all timeline

This commit is contained in:
trisua 2025-07-04 17:41:58 -04:00
parent 1dc0611298
commit e5b6b5a4d4
9 changed files with 34 additions and 43 deletions

View file

@ -631,6 +631,8 @@ pub struct TimelineQuery {
pub tag: String,
#[serde(default)]
pub paginated: bool,
#[serde(default)]
pub before: usize,
}
/// `/_swiss_army_timeline`
@ -688,7 +690,9 @@ pub async fn swiss_army_timeline_request(
// everything else
match req.tl {
DefaultTimelineChoice::AllPosts => {
data.0.get_latest_posts(12, req.page, &user).await
data.0
.get_latest_posts(12, req.page, &user, req.before)
.await
}
DefaultTimelineChoice::PopularPosts => {
data.0.get_popular_posts(12, req.page, 604_800_000).await