mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 00:09:30 +00:00
Addressing PR comments 2
This commit is contained in:
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…
Reference in a new issue