This commit is contained in:
ThatOneCalculator 2022-07-29 01:11:25 -07:00
parent bcc219566d
commit 669ee2c600
1 changed files with 1 additions and 2 deletions

View File

@ -59,7 +59,6 @@ export const paramDef = {
// eslint-disable-next-line import/no-default-export // eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
const m = await fetchMeta(); const m = await fetchMeta();
const instances = m.recommendedInstances;
if (m.disableRecommendedTimeline) { if (m.disableRecommendedTimeline) {
if (user == null || (!user.isAdmin && !user.isModerator)) { if (user == null || (!user.isAdmin && !user.isModerator)) {
throw new ApiError(meta.errors.rtlDisabled); throw new ApiError(meta.errors.rtlDisabled);
@ -71,7 +70,7 @@ export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(Notes.createQueryBuilder('note'), const query = makePaginationQuery(Notes.createQueryBuilder('note'),
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere(new Brackets(qb => { .andWhere(new Brackets(qb => {
qb.where('note.userHost IN (:instances)', { instances: instances }) qb.where('note.userHost IN (:instances)', { instances: m.recommendedInstances })
.orWhere('note.userHost IS NULL'); .orWhere('note.userHost IS NULL');
})) }))
.andWhere('(note.visibility = \'public\')') .andWhere('(note.visibility = \'public\')')