diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 63b026467..3993f450f 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -213,6 +213,10 @@ class Account < ApplicationRecord local? ? username : "#{username}@#{domain}" end + def pretty_acct + local? ? username : "#{username}@#{Addressable::IDNA.to_unicode(domain)}" + end + def local_username_and_domain "#{username}@#{Rails.configuration.x.local_domain}" end @@ -225,6 +229,10 @@ class Account < ApplicationRecord "acct:#{local_username_and_domain}" end + def searchable? + !(suspended? || moved?) + end + def possibly_stale? last_webfingered_at.nil? || last_webfingered_at <= 1.day.ago end |