From 9807b02efd194d2b4b262fe8a5d349c4fb048cd5 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 27 Apr 2024 11:05:26 -0400 Subject: [PATCH] Dont pass ref and clone. --- crates/apub/src/activities/create_or_update/post.rs | 6 +++--- crates/apub/src/collections/community_outbox.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/apub/src/activities/create_or_update/post.rs b/crates/apub/src/activities/create_or_update/post.rs index a0c1e59d0..53900c799 100644 --- a/crates/apub/src/activities/create_or_update/post.rs +++ b/crates/apub/src/activities/create_or_update/post.rs @@ -38,7 +38,7 @@ use url::Url; impl CreateOrUpdatePage { pub(crate) async fn new( - post: &ApubPost, + post: ApubPost, actor: &ApubPerson, community: &ApubCommunity, kind: CreateOrUpdateType, @@ -51,7 +51,7 @@ impl CreateOrUpdatePage { Ok(CreateOrUpdatePage { actor: actor.id().into(), to: vec![public()], - object: post.clone().into_json(context).await?, + object: post.into_json(context).await?, cc: vec![community.id()], kind, id: id.clone(), @@ -77,7 +77,7 @@ impl CreateOrUpdatePage { .into(); let create_or_update = - CreateOrUpdatePage::new(&post.into(), &person, &community, kind, &context).await?; + CreateOrUpdatePage::new(post.into(), &person, &community, kind, &context).await?; let is_mod_action = create_or_update.object.is_mod_action(&context).await?; let activity = AnnouncableActivities::CreateOrUpdatePost(create_or_update); send_activity_in_community( diff --git a/crates/apub/src/collections/community_outbox.rs b/crates/apub/src/collections/community_outbox.rs index 4c1528ff1..6b66c0859 100644 --- a/crates/apub/src/collections/community_outbox.rs +++ b/crates/apub/src/collections/community_outbox.rs @@ -55,7 +55,7 @@ impl Collection for ApubCommunityOutbox { let mut ordered_items = vec![]; for post_view in post_views { let create = CreateOrUpdatePage::new( - &post_view.post.into(), + post_view.post.into(), &post_view.creator.into(), owner, CreateOrUpdateType::Create,