tombstone gate all user paths; cleanup deletes late follower rows; spa self-delete to /; adr 0016 + purge comment
This commit is contained in:
@@ -27,10 +27,12 @@ pub async fn tombstone_gate(
|
||||
next.run(request).await
|
||||
}
|
||||
|
||||
/// The user id in `/users/{id}/outbox|featured|inbox`.
|
||||
/// The user id in any `/users/{id}/...` path (outbox, inbox, collections,
|
||||
/// content objects such as `/users/{id}/reviews/{rid}`). The bare actor path
|
||||
/// has its own tombstone response.
|
||||
pub fn gated_user(path: &str) -> Option<uuid::Uuid> {
|
||||
let rest = path.strip_prefix("/users/")?;
|
||||
let (id, endpoint) = rest.split_once('/')?;
|
||||
matches!(endpoint, "outbox" | "featured" | "inbox").then_some(())?;
|
||||
(!endpoint.is_empty()).then_some(())?;
|
||||
uuid::Uuid::parse_str(id).ok()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user