fix: AP bugs — backfill mapping, review activity type, also_known_as parse
- BackfillRequested now maps to BackfillFollower domain event (not FollowAccepted); worker calls run_backfill_for_follower to send LOCAL content to new follower inbox, instead of incorrectly trying to import from an inbox URL as if it were an outbox - reviews broadcast as Create activity instead of Add (semantically correct) - also_known_as JSON parse failure logs warning + preserves raw string as single-element vec instead of silently returning empty
This commit is contained in:
@@ -63,6 +63,10 @@ pub enum EventPayload {
|
||||
remote_actor_url: String,
|
||||
outbox_url: String,
|
||||
},
|
||||
BackfillFollower {
|
||||
owner_user_id: String,
|
||||
follower_inbox_url: String,
|
||||
},
|
||||
}
|
||||
|
||||
impl EventPayload {
|
||||
@@ -79,6 +83,7 @@ impl EventPayload {
|
||||
EventPayload::WatchlistEntryAdded { .. } => "WatchlistEntryAdded",
|
||||
EventPayload::WatchlistEntryRemoved { .. } => "WatchlistEntryRemoved",
|
||||
EventPayload::FollowAccepted { .. } => "FollowAccepted",
|
||||
EventPayload::BackfillFollower { .. } => "BackfillFollower",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -181,6 +186,13 @@ impl From<&DomainEvent> for EventPayload {
|
||||
remote_actor_url: remote_actor_url.clone(),
|
||||
outbox_url: outbox_url.clone(),
|
||||
},
|
||||
DomainEvent::BackfillFollower {
|
||||
owner_user_id,
|
||||
follower_inbox_url,
|
||||
} => EventPayload::BackfillFollower {
|
||||
owner_user_id: owner_user_id.value().to_string(),
|
||||
follower_inbox_url: follower_inbox_url.clone(),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,6 +293,13 @@ impl TryFrom<EventPayload> for DomainEvent {
|
||||
remote_actor_url,
|
||||
outbox_url,
|
||||
}),
|
||||
EventPayload::BackfillFollower {
|
||||
owner_user_id,
|
||||
follower_inbox_url,
|
||||
} => Ok(DomainEvent::BackfillFollower {
|
||||
owner_user_id: UserId::from_uuid(parse_uuid(&owner_user_id, "owner_user_id")?),
|
||||
follower_inbox_url,
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user