fix(bootstrap,worker): pass shared federation_repo to ApFederationAdapter

This commit is contained in:
2026-05-28 02:26:57 +02:00
parent a253efacec
commit 9c93baaa39
2 changed files with 10 additions and 3 deletions

View File

@@ -76,9 +76,10 @@ pub async fn build(cfg: &Config) -> Infrastructure {
// 3. ActivityPub federation
let connections_repo = Arc::new(PgRemoteActorConnectionRepository::new(pool.clone()));
let federation_repo = Arc::new(PostgresFederationRepository::new(pool.clone()));
let raw_ap_service = Arc::new(
ActivityPubService::builder(
Arc::new(PostgresFederationRepository::new(pool.clone())),
federation_repo.clone(),
Arc::new(PostgresApUserRepository::new(
pool.clone(),
cfg.base_url.clone(),
@@ -98,7 +99,11 @@ pub async fn build(cfg: &Config) -> Infrastructure {
.await
.expect("Failed to build ActivityPubService"),
);
let ap_service = Arc::new(ApFederationAdapter::new(raw_ap_service, connections_repo));
let ap_service = Arc::new(ApFederationAdapter::new(
raw_ap_service,
connections_repo,
federation_repo,
));
// 4. Storage adapter
let storage_cfg = StorageConfig {