fix(backend): Meilisearchが設定された状態でノート検索時にローカル/リモート設定が正しく動作しない

This commit is contained in:
NoriDev 2023-10-05 19:55:37 +09:00
parent ee0b628a28
commit a9bf79c2a6
2 changed files with 6 additions and 0 deletions

View file

@ -55,6 +55,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE
### Server
- Revert: Feat: 이모티콘 중복 체크 (misskey-dev/misskey#11941)
- Fix: Publish notes announced by relay (misskey-dev/misskey#11056)
- Fix: Meilisearch가 설정된 상태에서 노트 검색 시 로컬/리모트 설정이 제대로 작동하지 않음
---

View file

@ -173,6 +173,11 @@ export class SearchService {
if (pagination.sinceId) filter.qs.push({ op: '>', k: 'createdAt', v: this.idService.parse(pagination.sinceId).date.getTime() });
if (opts.userId) filter.qs.push({ op: '=', k: 'userId', v: opts.userId });
if (opts.channelId) filter.qs.push({ op: '=', k: 'channelId', v: opts.channelId });
if (opts.origin === 'local') {
filter.qs.push({ op: 'is null', k: 'userHost' });
} else if (opts.origin === 'remote') {
filter.qs.push({ op: 'is not null', k: 'userHost' });
}
if (opts.host) {
if (opts.host === '.') {
filter.qs.push({ op: 'is null', k: 'userHost' });