mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Dont set duplicate context for activities (#4233)
This commit is contained in:
parent
a5386187e3
commit
de85e51fac
@ -96,6 +96,13 @@ pub(crate) async fn get_activity(
|
||||
if sensitive {
|
||||
Ok(HttpResponse::Forbidden().finish())
|
||||
} else {
|
||||
create_apub_response(&activity.data)
|
||||
// Don't use create_apub_response() to avoid duplicate context (the activity stored in db
|
||||
// already includes context).
|
||||
let json = serde_json::to_string_pretty(&activity.data)?;
|
||||
Ok(
|
||||
HttpResponse::Ok()
|
||||
.content_type(FEDERATION_CONTENT_TYPE)
|
||||
.body(json),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user