fix: wire PgActivityPubRepository into ThoughtsObjectHandler — closes activitypub→postgres violation
This commit is contained in:
@@ -11,6 +11,7 @@ use domain::{errors::DomainError, events::DomainEvent, ports::EventPublisher};
|
|||||||
use postgres_search::PgSearchRepository;
|
use postgres_search::PgSearchRepository;
|
||||||
use activitypub_base::{ApFederationConfig, FederationData};
|
use activitypub_base::{ApFederationConfig, FederationData};
|
||||||
use activitypub::ThoughtsObjectHandler;
|
use activitypub::ThoughtsObjectHandler;
|
||||||
|
use postgres::activitypub::PgActivityPubRepository;
|
||||||
use postgres_federation::{PostgresApUserRepository, PostgresFederationRepository};
|
use postgres_federation::{PostgresApUserRepository, PostgresFederationRepository};
|
||||||
use state::AppState;
|
use state::AppState;
|
||||||
|
|
||||||
@@ -50,7 +51,10 @@ pub async fn build_state(pool: PgPool, jwt_secret: String) -> AppState {
|
|||||||
let fed_data = FederationData::new(
|
let fed_data = FederationData::new(
|
||||||
Arc::new(PostgresFederationRepository::new(pool.clone())),
|
Arc::new(PostgresFederationRepository::new(pool.clone())),
|
||||||
Arc::new(PostgresApUserRepository::new(pool.clone(), base_url.clone())),
|
Arc::new(PostgresApUserRepository::new(pool.clone(), base_url.clone())),
|
||||||
Arc::new(ThoughtsObjectHandler::new(pool.clone(), &base_url)),
|
Arc::new(ThoughtsObjectHandler::new(
|
||||||
|
std::sync::Arc::new(PgActivityPubRepository::new(pool.clone())),
|
||||||
|
&base_url,
|
||||||
|
)),
|
||||||
base_url,
|
base_url,
|
||||||
allow_registration,
|
allow_registration,
|
||||||
"thoughts".to_string(),
|
"thoughts".to_string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user