diff --git a/hosts/koi/containers/sharkey/Dockerfile b/hosts/koi/containers/sharkey/Dockerfile index 5b1253c..ace9264 100644 --- a/hosts/koi/containers/sharkey/Dockerfile +++ b/hosts/koi/containers/sharkey/Dockerfile @@ -36,6 +36,8 @@ RUN git apply /patches/stats.patch RUN git apply /patches/limits.patch RUN git apply /patches/unfollow-notification.patch RUN git apply /patches/webhook-notification.patch +# motivation: https://very.stupid.fish/notes/9shhrn2qncid008s +RUN git apply /patches/index-everything.patch RUN cp -f /patches/robots.txt packages/backend/assets/robots.txt # end patch diff --git a/hosts/koi/containers/sharkey/patches/index-everything.patch b/hosts/koi/containers/sharkey/patches/index-everything.patch new file mode 100644 index 0000000..e35f5ab --- /dev/null +++ b/hosts/koi/containers/sharkey/patches/index-everything.patch @@ -0,0 +1,47 @@ +diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts +index 631d707..cf537fd 100644 +--- a/packages/backend/src/core/NoteCreateService.ts ++++ b/packages/backend/src/core/NoteCreateService.ts +@@ -952,7 +952,7 @@ export class NoteCreateService implements OnApplicationShutdown { + } + + // Register to search database +- if (!user.noindex) this.index(note); ++ this.index(note); + } + + @bindThis +@@ -1051,7 +1051,7 @@ export class NoteCreateService implements OnApplicationShutdown { + } + + // Register to search database +- if (!user.noindex) this.index(note); ++ this.index(note); + } + + @bindThis +diff --git a/packages/backend/src/core/NoteEditService.ts b/packages/backend/src/core/NoteEditService.ts +index a01dfec..8fd3138 100644 +--- a/packages/backend/src/core/NoteEditService.ts ++++ b/packages/backend/src/core/NoteEditService.ts +@@ -728,7 +728,7 @@ export class NoteEditService implements OnApplicationShutdown { + } + + // Register to search database +- if (!user.noindex) this.index(note); ++ this.index(note); + } + + @bindThis +diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts +index 6dc3e85..087bd36 100644 +--- a/packages/backend/src/core/SearchService.ts ++++ b/packages/backend/src/core/SearchService.ts +@@ -115,7 +115,6 @@ export class SearchService { + @bindThis + public async indexNote(note: MiNote): Promise { + if (note.text == null && note.cw == null) return; +- if (!['home', 'public'].includes(note.visibility)) return; + + if (this.meilisearch) { + switch (this.meilisearchIndexScope) {