mirror of https://github.com/LemmyNet/lemmy.git
A few fixes.
parent
9a5bb8a189
commit
95d23ad6b4
|
@ -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);
|
// 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
|
// Alpha and gamma users follow beta community
|
||||||
let alphaFollow = await followBeta(alpha);
|
let alphaFollow = await followBeta(alpha);
|
||||||
expect(alphaFollow.community_view.community.local).toBe(false);
|
expect(alphaFollow.community_view.community.local).toBe(false);
|
||||||
|
|
|
@ -91,13 +91,14 @@ pub(in crate::http) async fn receive_group_inbox(
|
||||||
request: HttpRequest,
|
request: HttpRequest,
|
||||||
context: &LemmyContext,
|
context: &LemmyContext,
|
||||||
) -> Result<HttpResponse, LemmyError> {
|
) -> Result<HttpResponse, LemmyError> {
|
||||||
|
let res = receive_activity(request, activity.clone(), context).await;
|
||||||
if let GroupInboxActivities::AnnouncableActivities(announcable) = activity.clone() {
|
if let GroupInboxActivities::AnnouncableActivities(announcable) = activity.clone() {
|
||||||
let community = extract_community(&announcable.cc(), context, &mut 0).await?;
|
let community = extract_community(&announcable.cc(), context, &mut 0).await?;
|
||||||
if community.local {
|
if community.local {
|
||||||
AnnounceActivity::send(announcable, &community, vec![], context).await?;
|
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).
|
/// Returns an empty followers collection, only populating the size (for privacy).
|
||||||
|
|
Loading…
Reference in New Issue