feat: implement federated profile handling with support for remote actor URLs across multiple components
All checks were successful
CI / Check / Test (push) Successful in 1h7m53s
All checks were successful
CI / Check / Test (push) Successful in 1h7m53s
This commit is contained in:
@@ -66,6 +66,7 @@ pub async fn execute(
|
||||
query.limit,
|
||||
query.offset,
|
||||
query.search.clone(),
|
||||
query.include_remote,
|
||||
)?;
|
||||
let entries = deps.diary.query_diary(&filter).await?;
|
||||
Ok(base(Some(entries), None, None))
|
||||
@@ -122,6 +123,7 @@ fn paged_user_filter(
|
||||
limit: Option<u32>,
|
||||
offset: Option<u32>,
|
||||
search: Option<String>,
|
||||
include_remote: bool,
|
||||
) -> Result<DiaryFilter, DomainError> {
|
||||
let page = PageParams::new(limit, offset)?;
|
||||
Ok(DiaryFilter {
|
||||
@@ -130,6 +132,7 @@ fn paged_user_filter(
|
||||
movie_id: None,
|
||||
user_id: Some(user_id),
|
||||
search,
|
||||
include_remote,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -171,6 +174,7 @@ mod helper_tests {
|
||||
Some(20),
|
||||
Some(5),
|
||||
Some("blade".into()),
|
||||
false,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ pub struct GetUserProfileQuery {
|
||||
pub sort_by: domain::models::FeedSortBy,
|
||||
pub search: Option<String>,
|
||||
pub is_own_profile: bool,
|
||||
pub include_remote: bool,
|
||||
}
|
||||
|
||||
pub struct GetCurrentProfileQuery {
|
||||
|
||||
@@ -54,6 +54,7 @@ async fn returns_profile_with_empty_stats() {
|
||||
sort_by: domain::models::FeedSortBy::Date,
|
||||
search: None,
|
||||
is_own_profile: true,
|
||||
include_remote: false,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -88,6 +89,7 @@ async fn returns_history_view() {
|
||||
sort_by: domain::models::FeedSortBy::Date,
|
||||
search: None,
|
||||
is_own_profile: true,
|
||||
include_remote: false,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -124,6 +126,7 @@ async fn returns_trends_view() {
|
||||
sort_by: domain::models::FeedSortBy::Date,
|
||||
search: None,
|
||||
is_own_profile: true,
|
||||
include_remote: false,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -160,6 +163,7 @@ async fn returns_ratings_view() {
|
||||
sort_by: domain::models::FeedSortBy::Rating,
|
||||
search: None,
|
||||
is_own_profile: true,
|
||||
include_remote: false,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -194,6 +198,7 @@ async fn returns_recent_with_search() {
|
||||
sort_by: domain::models::FeedSortBy::Date,
|
||||
search: Some("blade".into()),
|
||||
is_own_profile: true,
|
||||
include_remote: false,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -228,6 +233,7 @@ async fn non_own_profile_skips_pending_followers() {
|
||||
sort_by: domain::models::FeedSortBy::Date,
|
||||
search: None,
|
||||
is_own_profile: false,
|
||||
include_remote: false,
|
||||
},
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user