mirror of
https://github.com/astro/buzzrelay.git
synced 2024-11-22 04:00:59 +00:00
relay: contrive a custom id of announcements
Relates to Github issue #4: ActivityPub implementations may check that
the host in this URI is the HTTP-signing host.
e2261b63e9/packages/backend/src/queue/processors/InboxProcessorService.ts (L159)
This commit is contained in:
parent
363152b0b4
commit
89938a7c53
1 changed files with 2 additions and 1 deletions
|
@ -180,13 +180,14 @@ pub fn spawn(
|
||||||
}
|
}
|
||||||
|
|
||||||
let actor_id = Arc::new(actor.uri());
|
let actor_id = Arc::new(actor.uri());
|
||||||
|
let announce_id = format!("https://{}/announce/{}", hostname, urlencoding::encode(&post_url));
|
||||||
let body = json!({
|
let body = json!({
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
"type": "Announce",
|
"type": "Announce",
|
||||||
"actor": *actor_id,
|
"actor": *actor_id,
|
||||||
"to": ["https://www.w3.org/ns/activitystreams#Public"],
|
"to": ["https://www.w3.org/ns/activitystreams#Public"],
|
||||||
"object": &post.uri,
|
"object": &post.uri,
|
||||||
"id": *post_url,
|
"id": announce_id,
|
||||||
});
|
});
|
||||||
let Ok(post_url_url) = reqwest::Url::parse(&post_url) else { continue; };
|
let Ok(post_url_url) = reqwest::Url::parse(&post_url) else { continue; };
|
||||||
let body = Arc::new(
|
let body = Arc::new(
|
||||||
|
|
Loading…
Reference in a new issue