diff --git a/packages/backend/src/server/api/common/generate-fts-query.ts b/packages/backend/src/server/api/common/generate-fts-query.ts index ad31b734a..073fccd3d 100644 --- a/packages/backend/src/server/api/common/generate-fts-query.ts +++ b/packages/backend/src/server/api/common/generate-fts-query.ts @@ -134,8 +134,12 @@ function afterFilter(query: SelectQueryBuilder, filter: string) { } function instanceFilter(query: SelectQueryBuilder, 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, filter: string, id: number) { diff --git a/packages/client/src/pages/search-filters.vue b/packages/client/src/pages/search-filters.vue index 346548c18..8191a6e6b 100644 --- a/packages/client/src/pages/search-filters.vue +++ b/packages/client/src/pages/search-filters.vue @@ -28,10 +28,10 @@
{{ i18n.ts._filters._dialog.userDomain }}
-

[-]from:[@]user[@host.tld]

-

[-]mention:[@]user[@host.tld]

-

[-]reply:[@]user[@host.tld]

-

[-]instance:domain.tld

+

[-]from:[@]user[@domain.tld]

+

[-]mention:[@]user[@domain.tld]

+

[-]reply:[@]user[@domain.tld]

+

[-]instance:local|domain.tld