デフォルトハッシュタグタイムライン
This commit is contained in:
parent
5667f5affd
commit
b283122951
|
@ -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')
|
||||||
|
|
|
@ -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')
|
||||||
|
|
Loading…
Reference in New Issue