Tatsuya Koishi 2024-07-27 19:04:53 +09:00
parent 1b66da505e
commit f4fb82ba23
2 changed files with 2 additions and 2 deletions

View File

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

View File

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