mirror of
https://github.com/astro/buzzrelay.git
synced 2024-12-18 00:16:31 +00:00
Merge pull request #8 from rafaelcaricio/add-published-field
Add missing `published` field to Announce
This commit is contained in:
commit
83f6679209
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_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,
|
||||
|
|
Loading…
Reference in a new issue