Set id on Create activities

This commit is contained in:
Shadowfacts 2023-01-05 23:09:00 -05:00
parent 129b83638a
commit 68a3b8e7a4
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
use super::{
actor::{self, ID},
conversation_context, db, federate, gen_converation_id,
conversation_context, db, federate, gen_ap_id, gen_converation_id,
types::{ArticleExt, Conversation},
util::{accept, rewrite_srcs},
DOMAIN,
@ -8,7 +8,7 @@ use super::{
use crate::generator::{HtmlContent, Post};
use activitystreams::{
activity::Create,
context,
context, iri,
iri_string::types::IriString,
object::{Article, ObjectExt},
prelude::{BaseExt, ExtendsExt},
@ -103,6 +103,7 @@ pub async fn federate_outgoing(pool: &SqlitePool) -> anyhow::Result<()> {
let mut create = Create::new(ID.as_str(), article.into_any_base()?);
create.add_context(context());
create.add_context(conversation_context());
create.set_id(iri!(gen_ap_id()));
create.set_many_tos(to);
create.set_many_ccs(cc);