A few fixes.

This commit is contained in:
Dessalines 2021-10-28 12:22:50 -04:00
parent 9a5bb8a189
commit 95d23ad6b4
2 changed files with 3 additions and 2 deletions

View file

@ -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);

View file

@ -91,13 +91,14 @@ pub(in crate::http) async fn receive_group_inbox(
request: HttpRequest,
context: &LemmyContext,
) -> Result<HttpResponse, LemmyError> {
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).