diff options
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 28a7aa500..ec49d9308 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -67,6 +67,8 @@ class Account < ApplicationRecord MAX_NOTE_LENGTH = (ENV['MAX_BIO_CHARS'] || 500).to_i MAX_FIELDS = (ENV['MAX_PROFILE_FIELDS'] || 4).to_i + LOCAL_DOMAINS = ENV.fetch('LOCAL_DOMAINS', '').chomp.split(/\.?\s+/).freeze + enum protocol: [:ostatus, :activitypub] validates :username, presence: true @@ -127,6 +129,10 @@ class Account < ApplicationRecord domain.nil? end + def network? + local? || domain.in?(LOCAL_DOMAINS) + end + def moved? moved_to_account_id.present? end |