mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-29 05:17:39 -07:00
fix(server): cannot show users
This commit is contained in:
parent
38cdd46063
commit
f571188dd0
1 changed files with 1 additions and 20 deletions
|
@ -51,26 +51,7 @@ export function generateMutedUserQueryForUsers(q: SelectQueryBuilder<any>, me: {
|
||||||
.select('muting.muteeId')
|
.select('muting.muteeId')
|
||||||
.where('muting.muterId = :muterId', { muterId: me.id });
|
.where('muting.muterId = :muterId', { muterId: me.id });
|
||||||
|
|
||||||
const mutingInstanceQuery = UserProfiles.createQueryBuilder('user_profile')
|
q.andWhere(`user.id NOT IN (${ mutingQuery.getQuery() })`);
|
||||||
.select('user_profile.mutedInstances')
|
|
||||||
.where('user_profile.userId = :muterId', { muterId: me.id });
|
|
||||||
|
|
||||||
q
|
|
||||||
.andWhere(`user.id NOT IN (${ mutingQuery.getQuery() })`)
|
|
||||||
// mute instances
|
|
||||||
.andWhere(new Brackets(qb => { qb
|
|
||||||
.andWhere('note.userHost IS NULL')
|
|
||||||
.orWhere(`NOT ((${ mutingInstanceQuery.getQuery() })::jsonb ? note.userHost)`);
|
|
||||||
}))
|
|
||||||
.andWhere(new Brackets(qb => { qb
|
|
||||||
.where('note.replyUserHost IS NULL')
|
|
||||||
.orWhere(`NOT ((${ mutingInstanceQuery.getQuery() })::jsonb ? note.replyUserHost)`);
|
|
||||||
}))
|
|
||||||
.andWhere(new Brackets(qb => { qb
|
|
||||||
.where('note.renoteUserHost IS NULL')
|
|
||||||
.orWhere(`NOT ((${ mutingInstanceQuery.getQuery() })::jsonb ? note.renoteUserHost)`);
|
|
||||||
}));
|
|
||||||
|
|
||||||
q.setParameters(mutingQuery.getParameters());
|
q.setParameters(mutingQuery.getParameters());
|
||||||
q.setParameters(mutingInstanceQuery.getParameters());
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue