Fix mention_urls error

This commit is contained in:
KMY 2023-04-06 10:06:56 +09:00
parent 489eeb4aa7
commit 5b4661c2f7
3 changed files with 22 additions and 2 deletions

View file

@ -42,7 +42,7 @@ class SearchService < BaseService
case @searchability
when 'public'
privacy_definition = privacy_definition.or(StatusesIndex.filter(term: { searchability: 'public' }))
privacy_definition = privacy_definition.or(StatusesIndex.filter(terms: { searchability: %w(unlisted) }).filter(terms: { account_id: following_account_ids })) unless following_account_ids.empty?
privacy_definition = privacy_definition.or(StatusesIndex.filter(term: { searchability: 'unlisted' }).filter(terms: { account_id: following_account_ids })) unless following_account_ids.empty?
privacy_definition = privacy_definition.or(StatusesIndex.filter(term: { searchability: 'direct' }).filter(term: { account_id: @account.id }))
when 'unlisted', 'private'
privacy_definition = privacy_definition.or(StatusesIndex.filter(terms: { searchability: %w(public unlisted) }).filter(terms: { account_id: following_account_ids })) unless following_account_ids.empty?