From 2d2f3f9040e3ce1ce64ee1f6db78f12277d2a495 Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Mon, 7 Aug 2023 19:24:13 +0200 Subject: [PATCH] Add missing `published` field to Announce --- src/relay.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/relay.rs b/src/relay.rs index 0f5be50..f453c92 100644 --- a/src/relay.rs +++ b/src/relay.rs @@ -174,6 +174,7 @@ pub fn spawn( }; let mut seen_actors = 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()) { if seen_actors.contains(&actor) { continue; @@ -185,6 +186,7 @@ pub fn spawn( "@context": "https://www.w3.org/ns/activitystreams", "type": "Announce", "actor": *actor_id, + "published": &published, "to": ["https://www.w3.org/ns/activitystreams#Public"], "object": &post.uri, "id": announce_id,