mirror of
https://github.com/astro/buzzrelay.git
synced 2024-11-27 22:31:01 +00:00
Add missing published
field to Announce
This commit is contained in:
parent
89938a7c53
commit
2d2f3f9040
1 changed files with 2 additions and 0 deletions
|
@ -174,6 +174,7 @@ pub fn spawn(
|
||||||
};
|
};
|
||||||
let mut seen_actors = HashSet::new();
|
let mut seen_actors = HashSet::new();
|
||||||
let mut seen_inboxes = HashSet::new();
|
let mut seen_inboxes = HashSet::new();
|
||||||
|
let published = chrono::Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true);
|
||||||
for actor in post.relay_targets(hostname.clone()) {
|
for actor in post.relay_targets(hostname.clone()) {
|
||||||
if seen_actors.contains(&actor) {
|
if seen_actors.contains(&actor) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -185,6 +186,7 @@ pub fn spawn(
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
"type": "Announce",
|
"type": "Announce",
|
||||||
"actor": *actor_id,
|
"actor": *actor_id,
|
||||||
|
"published": &published,
|
||||||
"to": ["https://www.w3.org/ns/activitystreams#Public"],
|
"to": ["https://www.w3.org/ns/activitystreams#Public"],
|
||||||
"object": &post.uri,
|
"object": &post.uri,
|
||||||
"id": announce_id,
|
"id": announce_id,
|
||||||
|
|
Loading…
Reference in a new issue