Better comparison of "local" domain

This commit is contained in:
Eugen Rochko 2016-10-06 16:36:16 +02:00
parent b304cc07d5
commit 15d01a5e08
4 changed files with 7 additions and 3 deletions

View file

@ -7,7 +7,7 @@ class FollowRemoteAccountService < BaseService
def call(uri)
username, domain = uri.split('@')
return Account.find_local(username) if domain == Rails.configuration.x.local_domain || domain.nil?
return Account.find_local(username) if TagManager.instance.local_domain?(domain)
account = Account.find_remote(username, domain)

View file

@ -63,7 +63,7 @@ class ProcessFeedService < BaseService
href = Addressable::URI.parse(href_val)
if href.host == Rails.configuration.x.local_domain
if TagManager.instance.local_domain?(href.host)
# A local user is mentioned
mentioned_account = Account.find_local(href.path.gsub('/users/', ''))