From 70455e5eeb4c0fa234da3d780941f36921fb4984 Mon Sep 17 00:00:00 2001 From: silverpill Date: Sun, 29 Jan 2023 21:13:35 +0000 Subject: [PATCH] Return "202 Accepted" when activity is accepted by inbox endpoint --- CHANGELOG.md | 3 ++- src/activitypub/views.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d599f2d..5b2b75e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Use proof suites with prefix `Mitra`. -- Add `https://w3id.org/security/data-integrity/v1` to JSON-LD context. +- Added `https://w3id.org/security/data-integrity/v1` to JSON-LD context. +- Return `202 Accepted` when activity is accepted by inbox endpoint. ## [1.12.0] - 2023-01-26 diff --git a/src/activitypub/views.rs b/src/activitypub/views.rs index 6907623..b9379bc 100644 --- a/src/activitypub/views.rs +++ b/src/activitypub/views.rs @@ -121,7 +121,7 @@ async fn inbox( ); error })?; - Ok(HttpResponse::Ok().finish()) + Ok(HttpResponse::Accepted().finish()) } #[derive(Deserialize)] @@ -304,7 +304,7 @@ async fn instance_actor_inbox( "received in instance inbox: {}", activity["type"].as_str().unwrap_or("Unknown"), ); - Ok(HttpResponse::Ok().finish()) + Ok(HttpResponse::Accepted().finish()) } pub fn instance_actor_scope() -> Scope {