fix: move user_feed to FeedRepository — proper counts and viewer flags for user timelines

This commit is contained in:
2026-05-14 16:06:38 +02:00
parent ecba9267cf
commit 970f5a1644
6 changed files with 59 additions and 40 deletions

View File

@@ -96,7 +96,7 @@ pub struct TestStore {
.filter(|t| t.in_reply_to_id.as_ref() == Some(id) || &t.id == id)
.cloned().collect())
}
async fn list_by_user(&self, _user_id: &UserId, _page: &PageParams) -> Result<Paginated<FeedEntry>, DomainError> {
async fn list_by_user(&self, _user_id: &UserId, _page: &PageParams) -> Result<Paginated<Thought>, DomainError> {
Ok(Paginated { items: vec![], total: 0, page: 1, per_page: 20 })
}
}
@@ -290,6 +290,9 @@ pub struct TestStore {
async fn tag_feed(&self, _tag_name: &str, _page: &PageParams, _viewer_id: Option<&UserId>) -> Result<Paginated<FeedEntry>, DomainError> {
Ok(Paginated { items: vec![], total: 0, page: 1, per_page: 20 })
}
async fn user_feed(&self, _user_id: &UserId, _page: &PageParams, _viewer_id: Option<&UserId>) -> Result<Paginated<FeedEntry>, DomainError> {
Ok(Paginated { items: vec![], total: 0, page: 1, per_page: 20 })
}
}
#[async_trait] impl SearchPort for TestStore {