From 3752c966885a3590fe5a9f11b828c42640a7987a Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 12 Nov 2024 10:42:16 +0100 Subject: [PATCH] fix --- crates/apub/src/objects/community.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/apub/src/objects/community.rs b/crates/apub/src/objects/community.rs index f3050612e..66bd00f39 100644 --- a/crates/apub/src/objects/community.rs +++ b/crates/apub/src/objects/community.rs @@ -187,7 +187,9 @@ impl Object for ApubCommunity { LanguageTag::to_language_id_multiple(group.language, &mut context.pool()).await?; let timestamp = group.updated.or(group.published).unwrap_or_else(naive_now); - let community = Community::insert_apub(&mut context.pool(), timestamp, &form).await?; + let community: ApubCommunity = Community::insert_apub(&mut context.pool(), timestamp, &form) + .await? + .into(); CommunityLanguage::update(&mut context.pool(), languages, community.id).await?; // Need to fetch mods synchronously, otherwise fetching a post in community with @@ -197,7 +199,7 @@ impl Object for ApubCommunity { } // These collections are not necessary for Lemmy to work, so ignore errors. - let community_: ApubCommunity = community.clone().into(); + let community_ = community.clone(); let context_ = context.reset_request_count(); spawn_try_task(async move { group.outbox.dereference(&community_, &context_).await.ok();