FROM clause

This commit is contained in:
ThatOneCalculator 2022-07-28 23:57:18 -07:00
parent 888038646f
commit a13c978122

View File

@ -68,7 +68,7 @@ export default define(meta, paramDef, async (ps, user) => {
//#region Construct query
const query = makePaginationQuery(Notes.createQueryBuilder('note'),
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('(note.visibility = \'public\') AND (note.userHost = ANY(meta.recommendedInstances))')
.andWhere('(note.visibility = \'public\') AND (note.userHost = ANY(meta.recommendedInstances FROM \'meta\'))')
.innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('user.avatar', 'avatar')
.leftJoinAndSelect('user.banner', 'banner')