From 996d0794764332b511419e06e8c75df1cc93907b Mon Sep 17 00:00:00 2001 From: PrivateGER Date: Sat, 5 Oct 2024 19:58:58 +0200 Subject: [PATCH] Make remove-all-following remove follows in both directions --- .../admin/federation/remove-all-following.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts index 7f84e7694d..601c898f52 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts @@ -37,9 +37,14 @@ export default class extends Endpoint { // eslint- private queueService: QueueService, ) { super(meta, paramDef, async (ps, me) => { - const followings = await this.followingsRepository.findBy({ - followerHost: ps.host, - }); + const followings = await this.followingsRepository.findBy([ + { + followeeHost: ps.host, + }, + { + followerHost: ps.host, + }, + ]); const pairs = await Promise.all(followings.map(f => Promise.all([ this.usersRepository.findOneByOrFail({ id: f.followerId }),