mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Dont pass ref and clone.
This commit is contained in:
parent
95ed87e87e
commit
9807b02efd
@ -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(
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user