refactor: remove SocialQueryPort — replaced by SocialQuery + FederationAdminQuery

-319 lines. Legacy SocialQueryPort trait, NoopSocialQueryPort,
PanicSocialQueryPort all deleted. Federation repos now implement
FederationAdminQuery (single method). get_users uses FederationAdminQuery.
All other consumers use unified SocialQuery.
This commit is contained in:
2026-07-10 16:02:27 +02:00
parent 7cfa234902
commit 44d7df33a2
19 changed files with 32 additions and 319 deletions

View File

@@ -154,30 +154,6 @@ impl DiaryQuery for Panic {
panic!()
}
}
#[cfg(feature = "federation")]
#[async_trait::async_trait]
impl domain::ports::SocialQueryPort for Panic {
async fn get_accepted_following_urls(&self, _: &UserId) -> Result<Vec<String>, DomainError> {
panic!()
}
async fn list_all_followed_remote_actors(
&self,
) -> Result<Vec<domain::models::RemoteActorInfo>, DomainError> {
panic!()
}
async fn count_following(&self, _: &UserId) -> Result<usize, DomainError> {
panic!()
}
async fn count_accepted_followers(&self, _: &UserId) -> Result<usize, DomainError> {
panic!()
}
async fn get_pending_followers(
&self,
_: &UserId,
) -> Result<Vec<domain::models::PendingFollowerInfo>, DomainError> {
panic!()
}
}
#[async_trait::async_trait]
impl StatsRepository for Panic {
async fn get_user_stats(&self, _: &UserId) -> Result<UserStats, DomainError> {
@@ -813,7 +789,7 @@ pub fn make_test_state(auth_service: Arc<dyn AuthService>) -> crate::state::AppS
remote_watchlist: Arc::clone(&repo) as _,
social_command: Arc::new(domain::ports::noop::NoopSocialCommand) as _,
social_query_unified: Arc::new(domain::ports::noop::NoopSocialQuery) as _,
social_query: Arc::clone(&repo) as _,
federation_admin: Arc::new(domain::ports::noop::NoopFederationAdminQuery) as _,
wrapup_stats: Arc::clone(&repo) as _,
wrapup_repo: Arc::clone(&repo) as _,
goal_command: Arc::clone(&repo) as _,