mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 14:21:19 +00:00
Dont pass ref and clone.
This commit is contained in:
parent
95ed87e87e
commit
9807b02efd
2 changed files with 4 additions and 4 deletions
|
@ -38,7 +38,7 @@ use url::Url;
|
||||||
|
|
||||||
impl CreateOrUpdatePage {
|
impl CreateOrUpdatePage {
|
||||||
pub(crate) async fn new(
|
pub(crate) async fn new(
|
||||||
post: &ApubPost,
|
post: ApubPost,
|
||||||
actor: &ApubPerson,
|
actor: &ApubPerson,
|
||||||
community: &ApubCommunity,
|
community: &ApubCommunity,
|
||||||
kind: CreateOrUpdateType,
|
kind: CreateOrUpdateType,
|
||||||
|
@ -51,7 +51,7 @@ impl CreateOrUpdatePage {
|
||||||
Ok(CreateOrUpdatePage {
|
Ok(CreateOrUpdatePage {
|
||||||
actor: actor.id().into(),
|
actor: actor.id().into(),
|
||||||
to: vec![public()],
|
to: vec![public()],
|
||||||
object: post.clone().into_json(context).await?,
|
object: post.into_json(context).await?,
|
||||||
cc: vec![community.id()],
|
cc: vec![community.id()],
|
||||||
kind,
|
kind,
|
||||||
id: id.clone(),
|
id: id.clone(),
|
||||||
|
@ -77,7 +77,7 @@ impl CreateOrUpdatePage {
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
let create_or_update =
|
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 is_mod_action = create_or_update.object.is_mod_action(&context).await?;
|
||||||
let activity = AnnouncableActivities::CreateOrUpdatePost(create_or_update);
|
let activity = AnnouncableActivities::CreateOrUpdatePost(create_or_update);
|
||||||
send_activity_in_community(
|
send_activity_in_community(
|
||||||
|
|
|
@ -55,7 +55,7 @@ impl Collection for ApubCommunityOutbox {
|
||||||
let mut ordered_items = vec![];
|
let mut ordered_items = vec![];
|
||||||
for post_view in post_views {
|
for post_view in post_views {
|
||||||
let create = CreateOrUpdatePage::new(
|
let create = CreateOrUpdatePage::new(
|
||||||
&post_view.post.into(),
|
post_view.post.into(),
|
||||||
&post_view.creator.into(),
|
&post_view.creator.into(),
|
||||||
owner,
|
owner,
|
||||||
CreateOrUpdateType::Create,
|
CreateOrUpdateType::Create,
|
||||||
|
|
Loading…
Reference in a new issue