mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 08:20:10 +00:00
Make remove-all-following remove follows in both directions
This commit is contained in:
parent
b3f925c426
commit
996d079476
1 changed files with 8 additions and 3 deletions
|
@ -37,9 +37,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private queueService: QueueService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const followings = await this.followingsRepository.findBy({
|
||||
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 }),
|
||||
|
|
Loading…
Reference in a new issue