mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-21 19:53:50 +01:00
[backend] Make postgres FTS filter: filters slightly more typo-safe
This commit is contained in:
parent
b7a5c192d8
commit
b2f6808bef
@ -147,9 +147,9 @@ function miscFilter(query: SelectQueryBuilder<any>, filter: string) {
|
||||
subQuery = Followings.createQueryBuilder('following')
|
||||
.select('following.followeeId')
|
||||
.where('following.followerId = :meId')
|
||||
} else if (filter === 'replies') {
|
||||
} else if (filter === 'replies' || filter === 'reply') {
|
||||
query.andWhere('note.replyId IS NOT NULL');
|
||||
} else if (filter === 'boosts' || filter === 'renotes') {
|
||||
} else if (filter === 'boosts' || filter === 'boost' || filter === 'renotes' || filter === 'renote') {
|
||||
query.andWhere('note.renoteId IS NOT NULL');
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ function miscFilterInverse(query: SelectQueryBuilder<any>, filter: string) {
|
||||
.where('following.followerId = :meId')
|
||||
} else if (filter === 'replies') {
|
||||
query.andWhere('note.replyId IS NULL');
|
||||
} else if (filter === 'boosts' || filter === 'renotes') {
|
||||
} else if (filter === 'boosts' || filter === 'boost' || filter === 'renotes' || filter === 'renote') {
|
||||
query.andWhere('note.renoteId IS NULL');
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
<div class="section _block">
|
||||
<div class="title">{{ i18n.ts._filters._dialog.miscFilters }}</div>
|
||||
<div class="content">
|
||||
<p><code>[-]filter:followers|following|replies|renotes|boosts</code></p>
|
||||
<p><code>[-]filter:followers|following|replies|reply|renote[s]|boost[s]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section _block">
|
||||
|
Loading…
Reference in New Issue
Block a user