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

@@ -94,38 +94,18 @@ impl super::SocialQuery for NoopSocialQuery {
async fn get_accepted_following_urls(&self, _: &UserId) -> Result<Vec<String>, DomainError> {
Ok(vec![])
}
async fn list_all_followed_remote_actors(
&self,
) -> Result<Vec<crate::models::RemoteActorInfo>, DomainError> {
Ok(vec![])
}
}
// ── NoopSocialQueryPort ───────────────────────────────────────────────────────
// ── NoopFederationAdminQuery ─────────────────────────────────────────────────
/// Stub used when federation is disabled — returns empty results.
pub struct NoopSocialQueryPort;
pub struct NoopFederationAdminQuery;
#[async_trait]
impl super::SocialQueryPort for NoopSocialQueryPort {
async fn get_accepted_following_urls(&self, _: &UserId) -> Result<Vec<String>, DomainError> {
Ok(vec![])
}
impl super::FederationAdminQuery for NoopFederationAdminQuery {
async fn list_all_followed_remote_actors(
&self,
) -> Result<Vec<crate::models::RemoteActorInfo>, DomainError> {
Ok(vec![])
}
async fn count_following(&self, _: &UserId) -> Result<usize, DomainError> {
Ok(0)
}
async fn count_accepted_followers(&self, _: &UserId) -> Result<usize, DomainError> {
Ok(0)
}
async fn get_pending_followers(
&self,
_: &UserId,
) -> Result<Vec<crate::models::PendingFollowerInfo>, DomainError> {
Ok(vec![])
}
}