fix: wire DeliveryRequested federation events — outbound AP delivery was broken

FederationEventBridge silently dropped DeliveryRequested events from k-ap,
so no Create/Delete/Accept activities were pushed to follower inboxes.
Reviews only reached remote instances via outbox backfill (pull), and
deletes never propagated.

Bridge now publishes FederationDeliveryRequested domain events through the
event bus; worker calls ap_service.deliver_to_inbox() to send them.
This commit is contained in:
2026-05-29 12:09:02 +02:00
parent 62ddb014d2
commit d1f9f55d4f
6 changed files with 66 additions and 2 deletions

View File

@@ -80,6 +80,23 @@ impl EventHandler for ActivityPubEventHandler {
.on_watchlist_removed(user_id, movie_id)
.await
.map_err(|e| DomainError::InfrastructureError(e.to_string())),
DomainEvent::FederationDeliveryRequested {
inbox_url,
activity_json,
signing_actor_id,
} => {
let inbox: url::Url = inbox_url
.parse()
.map_err(|e| DomainError::InfrastructureError(format!("bad inbox URL: {e}")))?;
let activity: serde_json::Value =
serde_json::from_str(activity_json).map_err(|e| {
DomainError::InfrastructureError(format!("bad activity JSON: {e}"))
})?;
self.ap_service
.deliver_to_inbox(inbox, activity, *signing_actor_id)
.await
.map_err(|e| DomainError::InfrastructureError(e.to_string()))
}
_ => Ok(()),
}
}