Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
penginn-net committed Nov 1, 2024
1 parent 095c1a5 commit e597a98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/backend/src/core/AdvancedSearchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ export class AdvancedSearchService {
reactionIncrement?: boolean,
searchableBy?: string,
}) {
if (!opts.remote && opts.searchableBy === 'private') {
if (!opts.remote && opts.searchableBy !== 'private') {
await this.index(this.reactionIndex, opts.id, {
noteId: opts.noteId,
userId: opts.userId,
Expand All @@ -444,7 +444,7 @@ export class AdvancedSearchService {
});
}
if (opts.reactionIncrement === false) return;
if (opts.remote && opts.searchableBy && opts.searchableBy === 'private') return;
if (opts.remote && opts.searchableBy === 'private') return;
if ((this.config.opensearch?.reactionSearchLocalOnly ?? false) && opts.remote && opts.reaction.includes('@')) return;

await this.opensearch?.update({
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/core/ReactionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class ReactionService {
// Create reaction
try {
await this.noteReactionsRepository.insert(record);
if (note.searchableBy && note.searchableBy !== 'private' && note.userHost !== null) {
if (!(note.searchableBy === 'private' && note.userHost === null)) {
await this.advancedSearchService.indexReaction({
id: record.id,
noteId: record.noteId,
Expand Down

0 comments on commit e597a98

Please sign in to comment.