From 95d23ad6b4b5edd9899cb39de7c5c4ec247ebb9a Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 28 Oct 2021 12:22:50 -0400 Subject: [PATCH] A few fixes. --- api_tests/src/comment.spec.ts | 2 +- crates/apub/src/http/community.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api_tests/src/comment.spec.ts b/api_tests/src/comment.spec.ts index 451e83de1..55d0c5d46 100644 --- a/api_tests/src/comment.spec.ts +++ b/api_tests/src/comment.spec.ts @@ -325,7 +325,7 @@ test('A and G subscribe to B (center) A posts, G mentions B, it gets announced t // expect(mentionsRes.mentions[0].score).toBe(1); }); -test('Check 3 instance shared inbox bug', async () => { +test('Check that activity from another instance is sent to third instance', async () => { // Alpha and gamma users follow beta community let alphaFollow = await followBeta(alpha); expect(alphaFollow.community_view.community.local).toBe(false); diff --git a/crates/apub/src/http/community.rs b/crates/apub/src/http/community.rs index 65a9459a4..dcaf551f1 100644 --- a/crates/apub/src/http/community.rs +++ b/crates/apub/src/http/community.rs @@ -91,13 +91,14 @@ pub(in crate::http) async fn receive_group_inbox( request: HttpRequest, context: &LemmyContext, ) -> Result { + let res = receive_activity(request, activity.clone(), context).await; if let GroupInboxActivities::AnnouncableActivities(announcable) = activity.clone() { let community = extract_community(&announcable.cc(), context, &mut 0).await?; if community.local { AnnounceActivity::send(announcable, &community, vec![], context).await?; } } - receive_activity(request, activity.clone(), context).await + res } /// Returns an empty followers collection, only populating the size (for privacy).