feat: account purge handler, tombstone cleanup, AP tombstone signing + 410
This commit is contained in:
@@ -17,6 +17,15 @@ pub async fn get_followers_collection(
|
||||
.and_then(|v| v.to_str().ok())
|
||||
.unwrap_or("");
|
||||
if accept.contains("application/activity+json") || accept.contains("application/ld+json") {
|
||||
if state
|
||||
.app_ctx
|
||||
.ap_document
|
||||
.actor_is_gone(user_id)
|
||||
.await
|
||||
.unwrap_or(false)
|
||||
{
|
||||
return StatusCode::GONE.into_response();
|
||||
}
|
||||
let page = params.get("page").and_then(|p| p.parse::<u32>().ok());
|
||||
return match state
|
||||
.app_ctx
|
||||
@@ -52,6 +61,15 @@ pub async fn get_following_collection(
|
||||
.and_then(|v| v.to_str().ok())
|
||||
.unwrap_or("");
|
||||
if accept.contains("application/activity+json") || accept.contains("application/ld+json") {
|
||||
if state
|
||||
.app_ctx
|
||||
.ap_document
|
||||
.actor_is_gone(user_id)
|
||||
.await
|
||||
.unwrap_or(false)
|
||||
{
|
||||
return StatusCode::GONE.into_response();
|
||||
}
|
||||
let page = params.get("page").and_then(|p| p.parse::<u32>().ok());
|
||||
return match state
|
||||
.app_ctx
|
||||
|
||||
@@ -20,6 +20,15 @@ pub async fn actor_document_response(
|
||||
if !(accept.contains("application/activity+json") || accept.contains("application/ld+json")) {
|
||||
return None;
|
||||
}
|
||||
if state
|
||||
.app_ctx
|
||||
.ap_document
|
||||
.actor_is_gone(user_id)
|
||||
.await
|
||||
.unwrap_or(false)
|
||||
{
|
||||
return Some(StatusCode::GONE.into_response());
|
||||
}
|
||||
Some(
|
||||
match state
|
||||
.app_ctx
|
||||
|
||||
Reference in New Issue
Block a user