removes joins on avatar and banner in endpoint /notes/children #303

Manually merged
Johann150 merged 1 commit from puniko/FoundKey:fix/endpoint-children into main 2023-01-05 20:06:45 +00:00

View file

@ -56,9 +56,7 @@ export const paramDef = {
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId)
.andWhere('note.id IN (SELECT id FROM note_replies(:noteId, :depth, :limit))', { noteId: ps.noteId, depth: ps.depth, limit: ps.limit })
.innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('user.avatar', 'avatar')
.leftJoinAndSelect('user.banner', 'banner');
.innerJoinAndSelect('note.user', 'user');
generateVisibilityQuery(query, user);
if (user) {