デフォルトハッシュタグタイムライン

This commit is contained in:
Tatsuya Koishi 2024-01-27 19:42:35 +09:00
parent 5667f5affd
commit b283122951
2 changed files with 2 additions and 3 deletions

View File

@ -205,7 +205,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (defaultTag == null) { if (defaultTag == null) {
qb.orWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)'); qb.orWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)');
} else { } else {
qb.orWhere(`(note.visibility = 'public') AND ('${normalizeForSearch(defaultTag)}' = any(note.tags)`); qb.orWhere(`(note.visibility = 'public') AND (':t' = any(note.tags)`, { t: normalizeForSearch(defaultTag)} );
} }
})) }))
.innerJoinAndSelect('note.user', 'user') .innerJoinAndSelect('note.user', 'user')

View File

@ -163,8 +163,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
} else { } else {
qb.andWhere(`':t' = any(note.tags)`, { t: normalizeForSearch(defaultTag) }); qb.andWhere(`':t' = any(note.tags)`, { t: normalizeForSearch(defaultTag) });
} }
} }))
))
.innerJoinAndSelect('note.user', 'user') .innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply') .leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote') .leftJoinAndSelect('note.renote', 'renote')