From 00b369c6ad20494d94e718a280abf44e81b8a2da Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Thu, 14 May 2026 22:16:20 +0200 Subject: [PATCH] feat(bootstrap): add ap_repo to AppState --- crates/bootstrap/src/factory.rs | 1 + crates/presentation/src/state.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/bootstrap/src/factory.rs b/crates/bootstrap/src/factory.rs index 7624935..0b08bba 100644 --- a/crates/bootstrap/src/factory.rs +++ b/crates/bootstrap/src/factory.rs @@ -110,6 +110,7 @@ pub async fn build(cfg: &Config) -> Infrastructure { hasher: Arc::new(auth::Argon2PasswordHasher), events: event_publisher, federation: ap_service.clone() as Arc, + ap_repo: Arc::new(PgActivityPubRepository::new(pool.clone())), }; Infrastructure { state, ap_service } diff --git a/crates/presentation/src/state.rs b/crates/presentation/src/state.rs index 7dcd1ef..5b9fbfb 100644 --- a/crates/presentation/src/state.rs +++ b/crates/presentation/src/state.rs @@ -20,4 +20,5 @@ pub struct AppState { pub hasher: Arc, pub events: Arc, pub federation: Arc, + pub ap_repo: Arc, }