diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-10-31 18:25:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 18:25:34 +0100 |
commit | 968f34300681d8082cf2f824722a3945fc604b2d (patch) | |
tree | 910675cc3b8d9022f65bcfa9bee1acee6af8d0e4 /app/presenters/instance_presenter.rb | |
parent | 371563b0e249b6369e04709fb974a8e57413529f (diff) | |
parent | 1fe4e5e38c17a726e6aea5d6033139653e89a379 (diff) |
Merge pull request #1876 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/presenters/instance_presenter.rb')
-rw-r--r-- | app/presenters/instance_presenter.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb index c461ac55f..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 @@ -84,10 +86,6 @@ class InstancePresenter < ActiveModelSerializers::Model @thumbnail ||= Rails.cache.fetch('site_uploads/thumbnail') { SiteUpload.find_by(var: 'thumbnail') } end - def hero - @hero ||= Rails.cache.fetch('site_uploads/hero') { SiteUpload.find_by(var: 'hero') } - end - def mascot @mascot ||= Rails.cache.fetch('site_uploads/mascot') { SiteUpload.find_by(var: 'mascot') } end |