Addressing PR comments 2

This commit is contained in:
Dessalines 2024-03-01 11:27:21 -05:00
parent 8cc80703d8
commit 6588b57dd0
2 changed files with 1 additions and 6 deletions

View file

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

View file

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