fix: check isIndexable in built-in post search

This commit is contained in:
naskya 2023-10-29 10:03:07 +00:00
parent abceee2823
commit cb53dab8bd

View File

@ -90,6 +90,7 @@ export default define(meta, paramDef, async (ps, me) => {
.andWhere("note.text ILIKE :q", { q: `%${sqlLikeEscape(ps.query)}%` }) .andWhere("note.text ILIKE :q", { q: `%${sqlLikeEscape(ps.query)}%` })
.andWhere("note.visibility = 'public'") .andWhere("note.visibility = 'public'")
.innerJoinAndSelect("note.user", "user") .innerJoinAndSelect("note.user", "user")
.andWhere("user.isIndexable = TRUE")
.leftJoinAndSelect("user.avatar", "avatar") .leftJoinAndSelect("user.avatar", "avatar")
.leftJoinAndSelect("user.banner", "banner") .leftJoinAndSelect("user.banner", "banner")
.leftJoinAndSelect("note.reply", "reply") .leftJoinAndSelect("note.reply", "reply")