refactor: adapters configured from config crate
This commit is contained in:
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user