mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
brackets
This commit is contained in:
parent
7852e3ae4a
commit
e2db8dd230
@ -66,11 +66,15 @@ export default define(meta, paramDef, async (ps, user) => {
|
||||
}
|
||||
}
|
||||
|
||||
// .andWhere('(note.userHost IN (:instances)) OR (note.userHost IS NULL)', { instances: instances })
|
||||
//#region Construct query
|
||||
const query = makePaginationQuery(Notes.createQueryBuilder('note'),
|
||||
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
||||
.andWhere(new Brackets(qb => {
|
||||
qb.where('((note.userHost IN (:instances))', { instances: instances })
|
||||
.orWhere('(note.userHost IS NULL)');
|
||||
}))
|
||||
.andWhere('(note.visibility = \'public\')')
|
||||
.andWhere('(note.userHost IN (:instances)) OR (note.userHost IS NULL)', { instances: instances })
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('user.avatar', 'avatar')
|
||||
.leftJoinAndSelect('user.banner', 'banner')
|
||||
|
Loading…
Reference in New Issue
Block a user