Fix local follows, 404 in logs
This commit is contained in:
parent
0f4bc56719
commit
509c18eb13
7 changed files with 28 additions and 11 deletions
|
@ -8,7 +8,7 @@ class FollowRemoteAccountService < BaseService
|
|||
def call(uri, subscribe = true)
|
||||
username, domain = uri.split('@')
|
||||
|
||||
return Account.find_local(username) if domain == Rails.configuration.x.local_domain
|
||||
return Account.find_local(username) if domain == Rails.configuration.x.local_domain || domain.nil?
|
||||
|
||||
account = Account.find_remote(username, domain)
|
||||
|
||||
|
|
|
@ -8,7 +8,13 @@ class FollowService < BaseService
|
|||
return nil if target_account.nil?
|
||||
|
||||
follow = source_account.follow!(target_account)
|
||||
NotificationWorker.perform_async(follow.stream_entry.id, target_account.id)
|
||||
|
||||
if target_account.local?
|
||||
NotificationMailer.follow(target_account, source_account).deliver_later
|
||||
else
|
||||
NotificationWorker.perform_async(follow.stream_entry.id, target_account.id)
|
||||
end
|
||||
|
||||
source_account.ping!(account_url(source_account, format: 'atom'), [Rails.configuration.x.hub_url])
|
||||
follow
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue