diff options
author | pluralcafe-docker <git@plural.cafe> | 2019-01-12 04:24:14 +0000 |
---|---|---|
committer | pluralcafe-docker <git@plural.cafe> | 2019-01-12 04:24:14 +0000 |
commit | ae24ef877b82466cab026a76ea6ed8598ddaae18 (patch) | |
tree | 584c25ada377f2e6da49a9b45b3da947501b1831 /app/models/concerns/account_finder_concern.rb | |
parent | fa1ab7fbe4166f3d8b481891dcc443df5aa212bb (diff) | |
parent | 2cfa55185a5fc7d93a160a4e9a4730aae6725b0f (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/models/concerns/account_finder_concern.rb')
-rw-r--r-- | app/models/concerns/account_finder_concern.rb | 4 |
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 6b7237e89..7e3bbde09 100644 --- a/app/models/concerns/account_finder_concern.rb +++ b/app/models/concerns/account_finder_concern.rb @@ -12,6 +12,10 @@ module AccountFinderConcern find_remote(username, domain) || raise(ActiveRecord::RecordNotFound) end + def representative + find_local(Setting.site_contact_username.gsub(/\A@/, '')) || Account.local.find_by(suspended: false) + end + def find_local(username) find_remote(username, nil) end |