From: Felix Ableitner Date: Tue, 16 Nov 2021 18:10:06 +0000 (+0100) Subject: Fix error due to same activity being inserted in database twice X-Git-Url: http://these/git/%22%7Bauthor_url%7D/static/gitweb.css?a=commitdiff_plain;h=db631005d3261042bc4021f1009eefa9cd65ae44;p=lemmy.git Fix error due to same activity being inserted in database twice --- diff --git a/crates/apub/src/activities/community/mod.rs b/crates/apub/src/activities/community/mod.rs index c2141c2d..23f8f8e3 100644 --- a/crates/apub/src/activities/community/mod.rs +++ b/crates/apub/src/activities/community/mod.rs @@ -1,7 +1,6 @@ use crate::{ activities::send_lemmy_activity, activity_lists::AnnouncableActivities, - insert_activity, objects::community::ApubCommunity, protocol::activities::community::announce::AnnounceActivity, }; @@ -30,8 +29,6 @@ pub(crate) async fn send_activity_in_community( send_lemmy_activity(context, &activity, activity_id, actor, inboxes, false).await?; if community.local { - let object_value = serde_json::to_value(&activity)?; - insert_activity(activity_id, object_value, true, false, context.pool()).await?; AnnounceActivity::send(activity, community, context).await?; }