]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/fetcher/objects.rs
Rewrite activitypub following, person, community, pm (#1692)
[lemmy.git] / crates / apub / src / fetcher / objects.rs
index a06b99d6394cc3e117c7a3bc2716d7c496abc733..835bf63a3199763cd5f9ec4c52a8d27a49606c32 100644 (file)
@@ -34,14 +34,7 @@ pub async fn get_or_fetch_and_insert_post(
       debug!("Fetching and creating remote post: {}", post_ap_id);
       let page =
         fetch_remote_object::<Page>(context.client(), post_ap_id, recursion_counter).await?;
-      let post = Post::from_apub(
-        &page,
-        context,
-        post_ap_id.to_owned(),
-        recursion_counter,
-        false,
-      )
-      .await?;
+      let post = Post::from_apub(&page, context, post_ap_id, recursion_counter).await?;
 
       Ok(post)
     }
@@ -73,14 +66,7 @@ pub async fn get_or_fetch_and_insert_comment(
       );
       let comment =
         fetch_remote_object::<Note>(context.client(), comment_ap_id, recursion_counter).await?;
-      let comment = Comment::from_apub(
-        &comment,
-        context,
-        comment_ap_id.to_owned(),
-        recursion_counter,
-        false,
-      )
-      .await?;
+      let comment = Comment::from_apub(&comment, context, comment_ap_id, recursion_counter).await?;
 
       let post_id = comment.post_id;
       let post = blocking(context.pool(), move |conn| Post::read(conn, post_id)).await??;