This commit is contained in:
syuilo 2019-04-24 14:39:59 +09:00
parent 5829b2a7c1
commit 1440c5bc65
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
2 changed files with 3 additions and 2 deletions

View file

@ -38,6 +38,7 @@ mongodb:
unreleased
-------------------
### Fixes
* 投稿のタグ検索APIで大文字小文字が区別されていたのを修正
* 公開範囲がホームの投稿がグローバルTLに流れる問題を修正
* モバイルビューの投稿詳細にて acct が長いとアイコンが圧迫面接される問題を修正

View file

@ -100,14 +100,14 @@ export default define(meta, async (ps, me) => {
if (me) generateMuteQuery(query, me);
if (ps.tag) {
query.andWhere(':tag = ANY(note.tags)', { tag: ps.tag });
query.andWhere(':tag = ANY(note.tags)', { tag: ps.tag.toLowerCase() });
} else {
let i = 0;
query.andWhere(new Brackets(qb => {
for (const tags of ps.query!) {
qb.orWhere(new Brackets(qb => {
for (const tag of tags) {
qb.andWhere(`:tag${i} = ANY(note.tags)`, { [`tag${i}`]: tag });
qb.andWhere(`:tag${i} = ANY(note.tags)`, { [`tag${i}`]: tag.toLowerCase() });
i++;
}
}));