mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
im stuff
This commit is contained in:
parent
acb27d13f5
commit
e2d3d8a9d4
1 changed files with 2 additions and 1 deletions
|
@ -59,6 +59,7 @@ 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);
|
||||||
|
@ -69,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('(note.visibility = \'public\')')
|
.andWhere('(note.visibility = \'public\')')
|
||||||
.andWhere('(note.userHost IN :instances) OR (note.userHost IS NULL)', { instances: m.recommendedInstances })
|
.andWhere('(note.userHost IN :instances) OR (note.userHost IS NULL)', { instances: instances })
|
||||||
.innerJoinAndSelect('note.user', 'user')
|
.innerJoinAndSelect('note.user', 'user')
|
||||||
.leftJoinAndSelect('user.avatar', 'avatar')
|
.leftJoinAndSelect('user.avatar', 'avatar')
|
||||||
.leftJoinAndSelect('user.banner', 'banner')
|
.leftJoinAndSelect('user.banner', 'banner')
|
||||||
|
|
Loading…
Reference in a new issue