remove joins

This commit is contained in:
Namekuji 2023-08-30 05:09:21 -04:00
parent a4b5ab42bf
commit d76d2fdf9c
No known key found for this signature in database
GPG key ID: 1D62332C07FBA532

View file

@ -101,17 +101,8 @@ export default define(meta, paramDef, async (ps, user) => {
ps.untilDate,
)
.where("note.id IN (:...noteIds)", { noteIds: noteIds })
.innerJoinAndSelect("note.user", "user")
.leftJoinAndSelect("user.avatar", "avatar")
.leftJoinAndSelect("user.banner", "banner")
.leftJoinAndSelect("note.reply", "reply")
.leftJoinAndSelect("note.renote", "renote")
.leftJoinAndSelect("reply.user", "replyUser")
.leftJoinAndSelect("replyUser.avatar", "replyUserAvatar")
.leftJoinAndSelect("replyUser.banner", "replyUserBanner")
.leftJoinAndSelect("renote.user", "renoteUser")
.leftJoinAndSelect("renoteUser.avatar", "renoteUserAvatar")
.leftJoinAndSelect("renoteUser.banner", "renoteUserBanner")
.andWhere("note.visibility != 'home'");
generateVisibilityQuery(query, user);