mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 15:39:11 +00: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 {
|
if sensitive {
|
||||||
Ok(HttpResponse::Forbidden().finish())
|
Ok(HttpResponse::Forbidden().finish())
|
||||||
} else {
|
} 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 a new issue