about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index ca298f5d8..a2fa60a83 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -474,6 +474,14 @@ class Account < ApplicationRecord
     target_account.following?(self) || ever_mentioned_by?(target_account)
   end
 
+  def service?
+    @_is_service ||= actor_type == "Application" || actor_type == "Service" || username == "relay" || username == domain
+  end
+
+  def can_be_marked_known?
+    !known && (!service || (service? && Setting.auto_mark_services_known)) && Setting.auto_mark_known
+  end
+
   class Field < ActiveModelSerializers::Model
     attributes :name, :value, :verified_at, :account, :errors