upd: completely change handling of indexable

This commit is contained in:
Mar0xy 2023-11-17 15:05:58 +01:00
parent 902e5a81f9
commit 55ef4c4d93
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
12 changed files with 40 additions and 25 deletions

View file

@ -223,7 +223,7 @@ export class NoteCreateService implements OnApplicationShutdown {
username: MiUser['username'];
host: MiUser['host'];
isBot: MiUser['isBot'];
isIndexable: MiUser['isIndexable'];
noindex: MiUser['noindex'];
}, data: Option, silent = false): Promise<MiNote> {
// チャンネル外にリプライしたら対象のスコープに合わせる
// (クライアントサイドでやっても良い処理だと思うけどとりあえずサーバーサイドで)
@ -384,7 +384,7 @@ export class NoteCreateService implements OnApplicationShutdown {
username: MiUser['username'];
host: MiUser['host'];
isBot: MiUser['isBot'];
isIndexable: MiUser['isIndexable'];
noindex: MiUser['noindex'];
}, data: Option, silent = false): Promise<MiNote> {
// チャンネル外にリプライしたら対象のスコープに合わせる
// (クライアントサイドでやっても良い処理だと思うけどとりあえずサーバーサイドで)
@ -642,7 +642,7 @@ export class NoteCreateService implements OnApplicationShutdown {
username: MiUser['username'];
host: MiUser['host'];
isBot: MiUser['isBot'];
isIndexable: MiUser['isIndexable'];
noindex: MiUser['noindex'];
}, data: Option, silent: boolean, tags: string[], mentionedUsers: MinimumUser[]) {
const meta = await this.metaService.fetch();
@ -873,7 +873,7 @@ export class NoteCreateService implements OnApplicationShutdown {
}
// Register to search database
if (user.isIndexable) this.index(note);
if (!user.noindex) this.index(note);
}
@bindThis
@ -882,7 +882,7 @@ export class NoteCreateService implements OnApplicationShutdown {
username: MiUser['username'];
host: MiUser['host'];
isBot: MiUser['isBot'];
isIndexable: MiUser['isIndexable'];
noindex: MiUser['noindex'];
}, data: Option, silent: boolean, tags: string[], mentionedUsers: MinimumUser[]) {
const meta = await this.metaService.fetch();
@ -972,7 +972,7 @@ export class NoteCreateService implements OnApplicationShutdown {
}
// Register to search database
if (user.isIndexable) this.index(note);
if (!user.noindex) this.index(note);
}
@bindThis