refactor: adapters configured from config crate

This commit is contained in:
2026-10-25 21:07:19 +01:00
parent 1f724bb064
commit 04f9c13625
45 changed files with 277 additions and 177 deletions

View File

@@ -68,6 +68,7 @@ pub struct ActivityPubDeps {
pub follow_query: std::sync::Arc<dyn domain::ports::FollowQuery>,
pub instance: domain::value_objects::InstanceIdentity,
pub allow_registration: bool,
pub federation: config::FederationConfig,
pub event_publisher: std::sync::Arc<dyn domain::ports::EventPublisher>,
}
@@ -92,6 +93,7 @@ pub async fn wire(deps: ActivityPubDeps) -> anyhow::Result<ActivityPubWire> {
follow_query: _,
instance,
allow_registration,
federation,
event_publisher,
} = deps;
let review_handler = std::sync::Arc::new(ReviewObjectHandler {
@@ -118,9 +120,7 @@ pub async fn wire(deps: ActivityPubDeps) -> anyhow::Result<ActivityPubWire> {
goal: goal_handler,
});
let federation_debug = std::env::var("FEDERATION_DEBUG")
.map(|v| v == "true" || v == "1")
.unwrap_or(false);
let federation_debug = federation.debug;
if federation_debug {
tracing::warn!(