Addressing PR comments 2

content_removal_remote_users
Dessalines 3 months ago
parent 8cc80703d8
commit 6588b57dd0

@ -540,11 +540,8 @@ test("Enforce site ban federation for federated user", async () => {
expect(banAlphaOnBeta.banned).toBe(true);
// The beta site ban should NOT be federated to alpha
let alphaPerson2 = (await getSite(alphaUserHttp)).my_user?.local_user_view
let alphaPerson2 = (await getSite(alphaUserHttp)).my_user!.local_user_view
.person;
if (!alphaPerson2) {
throw "Missing alpha person";
}
expect(alphaPerson2.banned).toBe(false);
// existing alpha post should be removed on beta

@ -192,7 +192,6 @@ pub(crate) async fn ban_nonlocal_user_from_local_communities(
// Ignore all errors for these
CommunityPersonBan::ban(&mut context.pool(), &community_user_ban_form)
.await
.with_lemmy_type(LemmyErrorType::CommunityUserAlreadyBanned)
.ok();
// Also unsubscribe them from the community, if they are subscribed
@ -208,7 +207,6 @@ pub(crate) async fn ban_nonlocal_user_from_local_communities(
} else {
CommunityPersonBan::unban(&mut context.pool(), &community_user_ban_form)
.await
.with_lemmy_type(LemmyErrorType::CommunityUserAlreadyBanned)
.ok();
}

Loading…
Cancel
Save