]> Untitled Git - lemmy.git/commitdiff
Disable ID domain check in FromApub until we figure it out properly
authorFelix Ableitner <me@nutomic.com>
Wed, 29 Jul 2020 11:58:39 +0000 (13:58 +0200)
committerFelix Ableitner <me@nutomic.com>
Wed, 29 Jul 2020 11:58:39 +0000 (13:58 +0200)
15 files changed:
server/src/apub/comment.rs
server/src/apub/community.rs
server/src/apub/fetcher.rs
server/src/apub/inbox/activities/create.rs
server/src/apub/inbox/activities/delete.rs
server/src/apub/inbox/activities/dislike.rs
server/src/apub/inbox/activities/like.rs
server/src/apub/inbox/activities/remove.rs
server/src/apub/inbox/activities/undo.rs
server/src/apub/inbox/activities/update.rs
server/src/apub/inbox/user_inbox.rs
server/src/apub/mod.rs
server/src/apub/post.rs
server/src/apub/private_message.rs
server/src/apub/user.rs

index 269e7fc25f58f695a7a88e155e08151c9cf5fb8c..650c60577e404ca11efa727f838524d08d4ebb4f 100644 (file)
@@ -131,7 +131,6 @@ impl FromApub for CommentForm {
     note: &Note,
     client: &Client,
     pool: &DbPool,
-    actor_id: &Url,
   ) -> Result<CommentForm, LemmyError> {
     let creator_actor_id = &note
       .attributed_to()
@@ -182,7 +181,7 @@ impl FromApub for CommentForm {
       published: note.published().map(|u| u.to_owned().naive_local()),
       updated: note.updated().map(|u| u.to_owned().naive_local()),
       deleted: None,
-      ap_id: note.id(actor_id.domain().unwrap())?.unwrap().to_string(),
+      ap_id: note.id_unchecked().unwrap().to_string(),
       local: false,
     })
   }
index b60059aa31c3cba3728df0702d5de99ed1620ef9..112b6e85165a76fd348e10b557bba3c60a55d24f 100644 (file)
@@ -321,12 +321,7 @@ impl FromApub for CommunityForm {
   type ApubType = GroupExt;
 
   /// Parse an ActivityPub group received from another instance into a Lemmy community.
-  async fn from_apub(
-    group: &GroupExt,
-    client: &Client,
-    pool: &DbPool,
-    actor_id: &Url,
-  ) -> Result<Self, LemmyError> {
+  async fn from_apub(group: &GroupExt, client: &Client, pool: &DbPool) -> Result<Self, LemmyError> {
     let creator_and_moderator_uris = group.inner.attributed_to().unwrap();
     let creator_uri = creator_and_moderator_uris
       .as_many()
@@ -363,11 +358,7 @@ impl FromApub for CommunityForm {
       updated: group.inner.updated().map(|u| u.to_owned().naive_local()),
       deleted: None,
       nsfw: group.ext_one.sensitive,
-      actor_id: group
-        .inner
-        .id(actor_id.domain().unwrap())?
-        .unwrap()
-        .to_string(),
+      actor_id: group.inner.id_unchecked().unwrap().to_string(),
       local: false,
       private_key: None,
       public_key: Some(group.ext_two.to_owned().public_key.public_key_pem),
index ff1ec11b7a92a47e55a345e8c8d11ea9857b94c7..c10426d14f2494a88ddc7428bec7741ff9bf61af 100644 (file)
@@ -172,7 +172,7 @@ pub async fn search_by_apub_id(
       response
     }
     SearchAcceptedObjects::Page(p) => {
-      let post_form = PostForm::from_apub(&p, client, pool, &query_url).await?;
+      let post_form = PostForm::from_apub(&p, client, pool).await?;
 
       let p = blocking(pool, move |conn| upsert_post(&post_form, conn)).await??;
       response.posts = vec![blocking(pool, move |conn| PostView::read(conn, p.id, None)).await??];
@@ -185,8 +185,8 @@ pub async fn search_by_apub_id(
       // TODO: also fetch parent comments if any
       let x = post_url.first().unwrap().as_xsd_any_uri().unwrap();
       let post = fetch_remote_object(client, x).await?;
-      let post_form = PostForm::from_apub(&post, client, pool, &query_url).await?;
-      let comment_form = CommentForm::from_apub(&c, client, pool, &query_url).await?;
+      let post_form = PostForm::from_apub(&post, client, pool).await?;
+      let comment_form = CommentForm::from_apub(&c, client, pool).await?;
 
       blocking(pool, move |conn| upsert_post(&post_form, conn)).await??;
       let c = blocking(pool, move |conn| upsert_comment(&comment_form, conn)).await??;
@@ -231,7 +231,7 @@ pub async fn get_or_fetch_and_upsert_user(
       debug!("Fetching and updating from remote user: {}", apub_id);
       let person = fetch_remote_object::<PersonExt>(client, apub_id).await?;
 
-      let mut uf = UserForm::from_apub(&person, client, pool, apub_id).await?;
+      let mut uf = UserForm::from_apub(&person, client, pool).await?;
       uf.last_refreshed_at = Some(naive_now());
       let user = blocking(pool, move |conn| User_::update(conn, u.id, &uf)).await??;
 
@@ -242,7 +242,7 @@ pub async fn get_or_fetch_and_upsert_user(
       debug!("Fetching and creating remote user: {}", apub_id);
       let person = fetch_remote_object::<PersonExt>(client, apub_id).await?;
 
-      let uf = UserForm::from_apub(&person, client, pool, apub_id).await?;
+      let uf = UserForm::from_apub(&person, client, pool).await?;
       let user = blocking(pool, move |conn| User_::create(conn, &uf)).await??;
 
       Ok(user)
@@ -282,7 +282,7 @@ pub async fn get_or_fetch_and_upsert_community(
       debug!("Fetching and updating from remote community: {}", apub_id);
       let group = fetch_remote_object::<GroupExt>(client, apub_id).await?;
 
-      let mut cf = CommunityForm::from_apub(&group, client, pool, apub_id).await?;
+      let mut cf = CommunityForm::from_apub(&group, client, pool).await?;
       cf.last_refreshed_at = Some(naive_now());
       let community = blocking(pool, move |conn| Community::update(conn, c.id, &cf)).await??;
 
@@ -293,7 +293,7 @@ pub async fn get_or_fetch_and_upsert_community(
       debug!("Fetching and creating remote community: {}", apub_id);
       let group = fetch_remote_object::<GroupExt>(client, apub_id).await?;
 
-      let cf = CommunityForm::from_apub(&group, client, pool, apub_id).await?;
+      let cf = CommunityForm::from_apub(&group, client, pool).await?;
       let community = blocking(pool, move |conn| Community::create(conn, &cf)).await??;
 
       // Also add the community moderators too
@@ -358,7 +358,7 @@ pub async fn get_or_fetch_and_insert_post(
     Err(NotFound {}) => {
       debug!("Fetching and creating remote post: {}", post_ap_id);
       let post = fetch_remote_object::<PageExt>(client, post_ap_id).await?;
-      let post_form = PostForm::from_apub(&post, client, pool, post_ap_id).await?;
+      let post_form = PostForm::from_apub(&post, client, pool).await?;
 
       let post = blocking(pool, move |conn| Post::create(conn, &post_form)).await??;
 
@@ -396,7 +396,7 @@ pub async fn get_or_fetch_and_insert_comment(
         comment_ap_id
       );
       let comment = fetch_remote_object::<Note>(client, comment_ap_id).await?;
-      let comment_form = CommentForm::from_apub(&comment, client, pool, comment_ap_id).await?;
+      let comment_form = CommentForm::from_apub(&comment, client, pool).await?;
 
       let comment = blocking(pool, move |conn| Comment::create(conn, &comment_form)).await??;
 
index da90bea53109a198d323052ddc6b74a8d8c04161..0f5595cd01d9504c7b83908d98ed85994a3ec859 100644 (file)
@@ -9,7 +9,6 @@ use crate::{
       get_user_from_activity,
       receive_unhandled_activity,
     },
-    ActorType,
     FromApub,
     PageExt,
   },
@@ -57,7 +56,7 @@ async fn receive_create_post(
   let user = get_user_from_activity(&create, client, pool).await?;
   let page = PageExt::from_any_base(create.object().to_owned().one().unwrap())?.unwrap();
 
-  let post = PostForm::from_apub(&page, client, pool, &user.actor_id()?).await?;
+  let post = PostForm::from_apub(&page, client, pool).await?;
 
   let inserted_post = blocking(pool, move |conn| Post::create(conn, &post)).await??;
 
@@ -89,7 +88,7 @@ async fn receive_create_comment(
   let user = get_user_from_activity(&create, client, pool).await?;
   let note = Note::from_any_base(create.object().to_owned().one().unwrap())?.unwrap();
 
-  let comment = CommentForm::from_apub(&note, client, pool, &user.actor_id()?).await?;
+  let comment = CommentForm::from_apub(&note, client, pool).await?;
 
   let inserted_comment = blocking(pool, move |conn| Comment::create(conn, &comment)).await??;
 
index 09df0bc1ed4bcd9ce2efbee1db86dadea93b8770..b4fe0de4867fe3ae0d8236b5d83375be8988f60f 100644 (file)
@@ -7,7 +7,6 @@ use crate::{
       get_user_from_activity,
       receive_unhandled_activity,
     },
-    ActorType,
     FromApub,
     GroupExt,
     PageExt,
@@ -58,7 +57,7 @@ async fn receive_delete_post(
   let user = get_user_from_activity(&delete, client, pool).await?;
   let page = PageExt::from_any_base(delete.object().to_owned().one().unwrap())?.unwrap();
 
-  let post_ap_id = PostForm::from_apub(&page, client, pool, &user.actor_id()?)
+  let post_ap_id = PostForm::from_apub(&page, client, pool)
     .await?
     .get_ap_id()?;
 
@@ -112,7 +111,7 @@ async fn receive_delete_comment(
   let user = get_user_from_activity(&delete, client, pool).await?;
   let note = Note::from_any_base(delete.object().to_owned().one().unwrap())?.unwrap();
 
-  let comment_ap_id = CommentForm::from_apub(&note, client, pool, &user.actor_id()?)
+  let comment_ap_id = CommentForm::from_apub(&note, client, pool)
     .await?
     .get_ap_id()?;
 
@@ -169,7 +168,7 @@ async fn receive_delete_community(
   let group = GroupExt::from_any_base(delete.object().to_owned().one().unwrap())?.unwrap();
   let user = get_user_from_activity(&delete, client, pool).await?;
 
-  let community_actor_id = CommunityForm::from_apub(&group, client, pool, &user.actor_id()?)
+  let community_actor_id = CommunityForm::from_apub(&group, client, pool)
     .await?
     .actor_id;
 
index 7135505e1a973e6bca9af9ab0f27e5c3bae73da2..cb12724d6d7b6cc7f2fbb21ac584d5aa90bbb32a 100644 (file)
@@ -7,7 +7,6 @@ use crate::{
       get_user_from_activity,
       receive_unhandled_activity,
     },
-    ActorType,
     FromApub,
     PageExt,
   },
@@ -53,7 +52,7 @@ async fn receive_dislike_post(
   let user = get_user_from_activity(&dislike, client, pool).await?;
   let page = PageExt::from_any_base(dislike.object().to_owned().one().unwrap())?.unwrap();
 
-  let post = PostForm::from_apub(&page, client, pool, &user.actor_id()?).await?;
+  let post = PostForm::from_apub(&page, client, pool).await?;
 
   let post_id = get_or_fetch_and_insert_post(&post.get_ap_id()?, client, pool)
     .await?
@@ -94,7 +93,7 @@ async fn receive_dislike_comment(
   let note = Note::from_any_base(dislike.object().to_owned().one().unwrap())?.unwrap();
   let user = get_user_from_activity(&dislike, client, pool).await?;
 
-  let comment = CommentForm::from_apub(&note, client, pool, &user.actor_id()?).await?;
+  let comment = CommentForm::from_apub(&note, client, pool).await?;
 
   let comment_id = get_or_fetch_and_insert_comment(&comment.get_ap_id()?, client, pool)
     .await?
index 36bdbfa8db0671815e2d3f7f7d518705f8dfa651..da92bbff33bfb0ec571623cafdafc5f48cef2894 100644 (file)
@@ -7,7 +7,6 @@ use crate::{
       get_user_from_activity,
       receive_unhandled_activity,
     },
-    ActorType,
     FromApub,
     PageExt,
   },
@@ -53,7 +52,7 @@ async fn receive_like_post(
   let user = get_user_from_activity(&like, client, pool).await?;
   let page = PageExt::from_any_base(like.object().to_owned().one().unwrap())?.unwrap();
 
-  let post = PostForm::from_apub(&page, client, pool, &user.actor_id()?).await?;
+  let post = PostForm::from_apub(&page, client, pool).await?;
 
   let post_id = get_or_fetch_and_insert_post(&post.get_ap_id()?, client, pool)
     .await?
@@ -94,7 +93,7 @@ async fn receive_like_comment(
   let note = Note::from_any_base(like.object().to_owned().one().unwrap())?.unwrap();
   let user = get_user_from_activity(&like, client, pool).await?;
 
-  let comment = CommentForm::from_apub(&note, client, pool, &user.actor_id()?).await?;
+  let comment = CommentForm::from_apub(&note, client, pool).await?;
 
   let comment_id = get_or_fetch_and_insert_comment(&comment.get_ap_id()?, client, pool)
     .await?
index 1ae482d420aa8d4b69bb84e80bdc7210c71860a8..af3d144b8adf6f98b28d8c680a926c5e58868ab0 100644 (file)
@@ -7,7 +7,6 @@ use crate::{
       get_user_from_activity,
       receive_unhandled_activity,
     },
-    ActorType,
     FromApub,
     GroupExt,
     PageExt,
@@ -58,7 +57,7 @@ async fn receive_remove_post(
   let mod_ = get_user_from_activity(&remove, client, pool).await?;
   let page = PageExt::from_any_base(remove.object().to_owned().one().unwrap())?.unwrap();
 
-  let post_ap_id = PostForm::from_apub(&page, client, pool, &mod_.actor_id()?)
+  let post_ap_id = PostForm::from_apub(&page, client, pool)
     .await?
     .get_ap_id()?;
 
@@ -112,7 +111,7 @@ async fn receive_remove_comment(
   let mod_ = get_user_from_activity(&remove, client, pool).await?;
   let note = Note::from_any_base(remove.object().to_owned().one().unwrap())?.unwrap();
 
-  let comment_ap_id = CommentForm::from_apub(&note, client, pool, &mod_.actor_id()?)
+  let comment_ap_id = CommentForm::from_apub(&note, client, pool)
     .await?
     .get_ap_id()?;
 
@@ -169,7 +168,7 @@ async fn receive_remove_community(
   let mod_ = get_user_from_activity(&remove, client, pool).await?;
   let group = GroupExt::from_any_base(remove.object().to_owned().one().unwrap())?.unwrap();
 
-  let community_actor_id = CommunityForm::from_apub(&group, client, pool, &mod_.actor_id()?)
+  let community_actor_id = CommunityForm::from_apub(&group, client, pool)
     .await?
     .actor_id;
 
index 3634bd44d3a8625a11943b2497ca506d2bd20ff1..332364843ce0ca30635c614e4b3f0d4f9025e201 100644 (file)
@@ -7,7 +7,6 @@ use crate::{
       get_user_from_activity,
       receive_unhandled_activity,
     },
-    ActorType,
     FromApub,
     GroupExt,
     PageExt,
@@ -123,7 +122,7 @@ async fn receive_undo_delete_comment(
   let user = get_user_from_activity(delete, client, pool).await?;
   let note = Note::from_any_base(delete.object().to_owned().one().unwrap())?.unwrap();
 
-  let comment_ap_id = CommentForm::from_apub(&note, client, pool, &user.actor_id()?)
+  let comment_ap_id = CommentForm::from_apub(&note, client, pool)
     .await?
     .get_ap_id()?;
 
@@ -181,7 +180,7 @@ async fn receive_undo_remove_comment(
   let mod_ = get_user_from_activity(remove, client, pool).await?;
   let note = Note::from_any_base(remove.object().to_owned().one().unwrap())?.unwrap();
 
-  let comment_ap_id = CommentForm::from_apub(&note, client, pool, &mod_.actor_id()?)
+  let comment_ap_id = CommentForm::from_apub(&note, client, pool)
     .await?
     .get_ap_id()?;
 
@@ -239,7 +238,7 @@ async fn receive_undo_delete_post(
   let user = get_user_from_activity(delete, client, pool).await?;
   let page = PageExt::from_any_base(delete.object().to_owned().one().unwrap())?.unwrap();
 
-  let post_ap_id = PostForm::from_apub(&page, client, pool, &user.actor_id()?)
+  let post_ap_id = PostForm::from_apub(&page, client, pool)
     .await?
     .get_ap_id()?;
 
@@ -294,7 +293,7 @@ async fn receive_undo_remove_post(
   let mod_ = get_user_from_activity(remove, client, pool).await?;
   let page = PageExt::from_any_base(remove.object().to_owned().one().unwrap())?.unwrap();
 
-  let post_ap_id = PostForm::from_apub(&page, client, pool, &mod_.actor_id()?)
+  let post_ap_id = PostForm::from_apub(&page, client, pool)
     .await?
     .get_ap_id()?;
 
@@ -349,7 +348,7 @@ async fn receive_undo_delete_community(
   let user = get_user_from_activity(delete, client, pool).await?;
   let group = GroupExt::from_any_base(delete.object().to_owned().one().unwrap())?.unwrap();
 
-  let community_actor_id = CommunityForm::from_apub(&group, client, pool, &user.actor_id()?)
+  let community_actor_id = CommunityForm::from_apub(&group, client, pool)
     .await?
     .actor_id;
 
@@ -413,7 +412,7 @@ async fn receive_undo_remove_community(
   let mod_ = get_user_from_activity(remove, client, pool).await?;
   let group = GroupExt::from_any_base(remove.object().to_owned().one().unwrap())?.unwrap();
 
-  let community_actor_id = CommunityForm::from_apub(&group, client, pool, &mod_.actor_id()?)
+  let community_actor_id = CommunityForm::from_apub(&group, client, pool)
     .await?
     .actor_id;
 
@@ -477,7 +476,7 @@ async fn receive_undo_like_comment(
   let user = get_user_from_activity(like, client, pool).await?;
   let note = Note::from_any_base(like.object().to_owned().one().unwrap())?.unwrap();
 
-  let comment = CommentForm::from_apub(&note, client, pool, &user.actor_id()?).await?;
+  let comment = CommentForm::from_apub(&note, client, pool).await?;
 
   let comment_id = get_or_fetch_and_insert_comment(&comment.get_ap_id()?, client, pool)
     .await?
@@ -523,7 +522,7 @@ async fn receive_undo_like_post(
   let user = get_user_from_activity(like, client, pool).await?;
   let page = PageExt::from_any_base(like.object().to_owned().one().unwrap())?.unwrap();
 
-  let post = PostForm::from_apub(&page, client, pool, &user.actor_id()?).await?;
+  let post = PostForm::from_apub(&page, client, pool).await?;
 
   let post_id = get_or_fetch_and_insert_post(&post.get_ap_id()?, client, pool)
     .await?
index 2d5d06606967dd1fdf43b4163029fbefde0d2a16..5da262e1fdbac3b4147c31a9f9a04b2a8b85b0cb 100644 (file)
@@ -10,7 +10,6 @@ use crate::{
       get_user_from_activity,
       receive_unhandled_activity,
     },
-    ActorType,
     FromApub,
     PageExt,
   },
@@ -57,7 +56,7 @@ async fn receive_update_post(
   let user = get_user_from_activity(&update, client, pool).await?;
   let page = PageExt::from_any_base(update.object().to_owned().one().unwrap())?.unwrap();
 
-  let post = PostForm::from_apub(&page, client, pool, &user.actor_id()?).await?;
+  let post = PostForm::from_apub(&page, client, pool).await?;
 
   let post_id = get_or_fetch_and_insert_post(&post.get_ap_id()?, client, pool)
     .await?
@@ -89,7 +88,7 @@ async fn receive_update_comment(
   let note = Note::from_any_base(update.object().to_owned().one().unwrap())?.unwrap();
   let user = get_user_from_activity(&update, client, pool).await?;
 
-  let comment = CommentForm::from_apub(&note, client, pool, &user.actor_id()?).await?;
+  let comment = CommentForm::from_apub(&note, client, pool).await?;
 
   let comment_id = get_or_fetch_and_insert_comment(&comment.get_ap_id()?, client, pool)
     .await?
index 13d974e9af191664693eb45fbd3c992a75a828e9..be99d81a0b286ae1fc8525482e3c8764cd3434c1 100644 (file)
@@ -121,7 +121,7 @@ async fn receive_create_private_message(
 
   insert_activity(user.id, create, false, pool).await?;
 
-  let private_message = PrivateMessageForm::from_apub(&note, client, pool, user_uri).await?;
+  let private_message = PrivateMessageForm::from_apub(&note, client, pool).await?;
 
   let inserted_private_message = blocking(pool, move |conn| {
     PrivateMessage::create(conn, &private_message)
@@ -162,7 +162,7 @@ async fn receive_update_private_message(
 
   insert_activity(user.id, update, false, pool).await?;
 
-  let private_message_form = PrivateMessageForm::from_apub(&note, client, pool, user_uri).await?;
+  let private_message_form = PrivateMessageForm::from_apub(&note, client, pool).await?;
 
   let private_message_ap_id = private_message_form.ap_id.clone();
   let private_message = blocking(pool, move |conn| {
@@ -211,7 +211,7 @@ async fn receive_delete_private_message(
 
   insert_activity(user.id, delete, false, pool).await?;
 
-  let private_message_form = PrivateMessageForm::from_apub(&note, client, pool, user_uri).await?;
+  let private_message_form = PrivateMessageForm::from_apub(&note, client, pool).await?;
 
   let private_message_ap_id = private_message_form.ap_id;
   let private_message = blocking(pool, move |conn| {
@@ -273,7 +273,7 @@ async fn receive_undo_delete_private_message(
 
   insert_activity(user.id, delete, false, pool).await?;
 
-  let private_message = PrivateMessageForm::from_apub(&note, client, pool, user_uri).await?;
+  let private_message = PrivateMessageForm::from_apub(&note, client, pool).await?;
 
   let private_message_ap_id = private_message.ap_id.clone();
   let private_message_id = blocking(pool, move |conn| {
index 47f01e315b38a9ee1f308ce856118cf07d567f9c..28eb86ac2ce59d9ba3be53384ffa30435af57118 100644 (file)
@@ -132,7 +132,6 @@ pub trait FromApub {
     apub: &Self::ApubType,
     client: &Client,
     pool: &DbPool,
-    actor_id: &Url,
   ) -> Result<Self, LemmyError>
   where
     Self: Sized;
index a4cf8e4ccdff2506dbfb050be825722317166467..39e4faf3412e602851de0b9208ac9b9392a90a77 100644 (file)
@@ -154,7 +154,6 @@ impl FromApub for PostForm {
     page: &PageExt,
     client: &Client,
     pool: &DbPool,
-    actor_id: &Url,
   ) -> Result<PostForm, LemmyError> {
     let ext = &page.ext_one;
     let creator_actor_id = page
@@ -246,11 +245,7 @@ impl FromApub for PostForm {
       embed_description,
       embed_html,
       thumbnail_url,
-      ap_id: page
-        .inner
-        .id(actor_id.domain().unwrap())?
-        .unwrap()
-        .to_string(),
+      ap_id: page.inner.id_unchecked().unwrap().to_string(),
       local: false,
     })
   }
index 5f8abca8e29bb3cb27b576196909c3de24529c36..f58a6bfed46cafaf0cf708decceb9175521011f1 100644 (file)
@@ -75,7 +75,6 @@ impl FromApub for PrivateMessageForm {
     note: &Note,
     client: &Client,
     pool: &DbPool,
-    actor_id: &Url,
   ) -> Result<PrivateMessageForm, LemmyError> {
     let creator_actor_id = note
       .attributed_to()
@@ -103,7 +102,7 @@ impl FromApub for PrivateMessageForm {
       updated: note.updated().map(|u| u.to_owned().naive_local()),
       deleted: None,
       read: None,
-      ap_id: note.id(actor_id.domain().unwrap())?.unwrap().to_string(),
+      ap_id: note.id_unchecked().unwrap().to_string(),
       local: false,
     })
   }
index 9d8c9167ff0492e1d2e82b26e82fb3f08afca0e6..0e90941d6d8b378b0075c7b31b95190f6b9640fd 100644 (file)
@@ -201,12 +201,7 @@ impl ActorType for User_ {
 impl FromApub for UserForm {
   type ApubType = PersonExt;
   /// Parse an ActivityPub person received from another instance into a Lemmy user.
-  async fn from_apub(
-    person: &PersonExt,
-    _: &Client,
-    _: &DbPool,
-    actor_id: &Url,
-  ) -> Result<Self, LemmyError> {
+  async fn from_apub(person: &PersonExt, _: &Client, _: &DbPool) -> Result<Self, LemmyError> {
     let avatar = match person.icon() {
       Some(any_image) => Image::from_any_base(any_image.as_one().unwrap().clone())
         .unwrap()
@@ -242,7 +237,7 @@ impl FromApub for UserForm {
       show_avatars: false,
       send_notifications_to_email: false,
       matrix_user_id: None,
-      actor_id: person.id(actor_id.domain().unwrap())?.unwrap().to_string(),
+      actor_id: person.id_unchecked().unwrap().to_string(),
       bio: person
         .inner
         .summary()