bump k-ap 0.4.4, handle OutboundFollowAccepted w/ outbox backfill
All checks were successful
lint / lint (push) Successful in 17m36s
test / unit (push) Successful in 21m21s

This commit is contained in:
2026-07-11 10:48:23 +02:00
parent 09f5caefe7
commit 1e7886fb85
8 changed files with 45 additions and 8 deletions

View File

@@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
k-ap = { version = "0.4.0", registry = "gitea" }
k-ap = { version = "0.4.4", registry = "gitea" }
domain = { workspace = true }
url = { workspace = true }
serde = { workspace = true }

View File

@@ -97,6 +97,11 @@ pub enum EventPayload {
owner_user_id: String,
follower_inbox_url: String,
},
FederationOutboundFollowAccepted {
local_user_id: String,
remote_actor_url: String,
outbox_url: Option<String>,
},
}
impl EventPayload {
@@ -124,6 +129,7 @@ impl EventPayload {
Self::MentionReceived { .. } => "mentions.received",
Self::FederationDeliveryRequested { .. } => "federation.delivery.requested",
Self::FederationBackfillRequested { .. } => "federation.backfill.requested",
Self::FederationOutboundFollowAccepted { .. } => "federation.outbound_follow.accepted",
}
}
}
@@ -421,7 +427,8 @@ impl TryFrom<EventPayload> for DomainEvent {
author_user_id: UserId::from_uuid(parse_uuid(&author_user_id, "author_user_id")?),
},
EventPayload::FederationDeliveryRequested { .. }
| EventPayload::FederationBackfillRequested { .. } => {
| EventPayload::FederationBackfillRequested { .. }
| EventPayload::FederationOutboundFollowAccepted { .. } => {
return Err(DomainError::Internal(
"federation infrastructure event — not a domain event".into(),
));

View File

@@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
k-ap = { version = "0.4.0", registry = "gitea" }
k-ap = { version = "0.4.4", registry = "gitea" }
sqlx = { workspace = true }
uuid = { workspace = true }
chrono = { workspace = true }