fix: duplicated posts in all timeline
This commit is contained in:
parent
1dc0611298
commit
e5b6b5a4d4
9 changed files with 34 additions and 43 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue