about summary refs log tree commit diff
path: root/app/presenters
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-10-21 14:07:02 +0200
committerGitHub <noreply@github.com>2022-10-21 14:07:02 +0200
commitabf6c87ee8b57e09dca5f5b1fe1839a314e1aa46 (patch)
treeb36275028768d23ba1f1513e54fe826363ad6149 /app/presenters
parentc60f9cb86568f65d8e743b41c482163ef1ceaf99 (diff)
Fix remote account in contact account setting not being used (#19351)
Diffstat (limited to 'app/presenters')
-rw-r--r--app/presenters/instance_presenter.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb
index 43594a280..fba3cc734 100644
--- a/app/presenters/instance_presenter.rb
+++ b/app/presenters/instance_presenter.rb
@@ -12,7 +12,9 @@ class InstancePresenter < ActiveModelSerializers::Model
     end
 
     def account
-      Account.find_local(Setting.site_contact_username.strip.gsub(/\A@/, ''))
+      username, domain = Setting.site_contact_username.strip.gsub(/\A@/, '').split('@', 2)
+      domain = nil if TagManager.instance.local_domain?(domain)
+      Account.find_remote(username, domain) if username.present?
     end
   end