feat: publish FollowAccepted event when remote accepts follow

This commit is contained in:
2026-05-13 01:28:03 +02:00
parent b1d4b4de2d
commit 2567103587
5 changed files with 31 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ use std::sync::Arc;
use crate::content::ApObjectHandler;
use crate::repository::FederationRepository;
use crate::user::ApUserRepository;
use domain::ports::EventPublisher;
#[derive(Clone)]
pub struct FederationData {
@@ -13,6 +14,7 @@ pub struct FederationData {
pub(crate) domain: String,
pub(crate) allow_registration: bool,
pub(crate) software_name: String,
pub(crate) event_publisher: Option<Arc<dyn EventPublisher>>,
}
impl FederationData {
@@ -23,6 +25,7 @@ impl FederationData {
base_url: String,
allow_registration: bool,
software_name: String,
event_publisher: Option<Arc<dyn EventPublisher>>,
) -> Self {
let domain = base_url
.trim_start_matches("https://")
@@ -39,6 +42,7 @@ impl FederationData {
domain,
allow_registration,
software_name,
event_publisher,
}
}
}