mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 07:23:43 +01:00
Search only from followees (#5897)
This commit is contained in:
parent
34e2a06de0
commit
d7a17b5e8b
1 changed files with 6 additions and 2 deletions
|
@ -58,12 +58,16 @@ class AccountSearchService < BaseService
|
||||||
@_domain_is_local ||= TagManager.instance.local_domain?(query_domain)
|
@_domain_is_local ||= TagManager.instance.local_domain?(query_domain)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def search_from
|
||||||
|
options[:following] && account ? account.following : Account
|
||||||
|
end
|
||||||
|
|
||||||
def exact_match
|
def exact_match
|
||||||
@_exact_match ||= begin
|
@_exact_match ||= begin
|
||||||
if domain_is_local?
|
if domain_is_local?
|
||||||
Account.find_local(query_username)
|
search_from.find_local(query_username)
|
||||||
else
|
else
|
||||||
Account.find_remote(query_username, query_domain)
|
search_from.find_remote(query_username, query_domain)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue