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:
@@ -58,7 +58,12 @@ fn remote_actor_from_row(row: &sqlx::sqlite::SqliteRow, url_col: &str) -> Remote
|
||||
.try_get::<Option<String>, _>("also_known_as")
|
||||
.ok()
|
||||
.flatten()
|
||||
.map(|s| serde_json::from_str(&s).unwrap_or_default())
|
||||
.map(|s| {
|
||||
serde_json::from_str::<Vec<String>>(&s).unwrap_or_else(|e| {
|
||||
tracing::warn!(raw = %s, error = %e, "failed to parse also_known_as JSON");
|
||||
vec![s]
|
||||
})
|
||||
})
|
||||
.unwrap_or_default(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user