Fix group_only restriction not working when exact match in account search

This commit is contained in:
noellabo 2020-07-27 07:28:29 +09:00
parent 2acc45d777
commit c985cf5536

View file

@ -38,6 +38,13 @@ class AccountSearchService < BaseService
end
match = nil if !match.nil? && !account.nil? && options[:following] && !account.following?(match)
@exact_match = nil
unless match.nil? || account.nil?
return if options[:following] && !account.following?(match)
return if options[:followers] && !match.following?(account)
return if options[:group_only] && !match.group?
end
@exact_match = match
end