about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-09-20 02:17:10 -0500
committerFire Demon <firedemon@creature.cafe>2020-09-20 02:17:10 -0500
commita7ce3b78f6b1f9c39a429986cfb55e7fce4fdae1 (patch)
treeebd5bacf326f7b8c7814f6ffb117fc6ea83b33d8
parent81adb660514524f0250c5d07e12af39e8f6177ce (diff)
[Models] Add site_contact convenience method to AccountFinder
-rw-r--r--app/models/concerns/account_finder_concern.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/concerns/account_finder_concern.rb b/app/models/concerns/account_finder_concern.rb
index 04b2c981b..c414a6d87 100644
--- a/app/models/concerns/account_finder_concern.rb
+++ b/app/models/concerns/account_finder_concern.rb
@@ -16,6 +16,10 @@ module AccountFinderConcern
       Account.find(-99)
     end
 
+    def site_contact
+      Account.find_local(Setting.site_contact_username.strip.gsub(/\A@/, '')).presence || representative
+    end
+
     def find_local(username)
       find_remote(username, nil)
     end