mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
[backend] Add instance:local postgres FTS filter
This commit is contained in:
parent
e1ae37dbdb
commit
98f40d8865
@ -134,8 +134,12 @@ function afterFilter(query: SelectQueryBuilder<any>, filter: string) {
|
||||
}
|
||||
|
||||
function instanceFilter(query: SelectQueryBuilder<any>, filter: string, id: number) {
|
||||
query.andWhere(`note.userHost = :instance_${id}`);
|
||||
query.setParameter(`instance_${id}`, filter);
|
||||
if (filter === 'local') {
|
||||
query.andWhere(`note.userHost IS NULL`);
|
||||
} else {
|
||||
query.andWhere(`note.userHost = :instance_${id}`);
|
||||
query.setParameter(`instance_${id}`, filter);
|
||||
}
|
||||
}
|
||||
|
||||
function instanceFilterInverse(query: SelectQueryBuilder<any>, filter: string, id: number) {
|
||||
|
@ -28,10 +28,10 @@
|
||||
<div class="section _block">
|
||||
<div class="title">{{ i18n.ts._filters._dialog.userDomain }}</div>
|
||||
<div class="content">
|
||||
<p><code>[-]from:[@]user[@host.tld]</code></p>
|
||||
<p><code>[-]mention:[@]user[@host.tld]</code></p>
|
||||
<p><code>[-]reply:[@]user[@host.tld]</code></p>
|
||||
<p><code>[-]instance:domain.tld</code></p>
|
||||
<p><code>[-]from:[@]user[@domain.tld]</code></p>
|
||||
<p><code>[-]mention:[@]user[@domain.tld]</code></p>
|
||||
<p><code>[-]reply:[@]user[@domain.tld]</code></p>
|
||||
<p><code>[-]instance:local|domain.tld</code></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section _block">
|
||||
|
Loading…
Reference in New Issue
Block a user