about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-14 06:03:33 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-14 06:03:33 -0600
commit5959c60e4482945923b087833c4953102baf290e (patch)
tree23a93e39baf5bbd9b33754ea2e8c8f65a7bf6988 /app/models
parentc84dfd5285bc57761ae3c2c5a5eb466baa3d3218 (diff)
automatically trust the instance actor when marking another account as known
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 90da8bd21..be46a743f 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -251,6 +251,13 @@ class Account < ApplicationRecord
 
   def mark_known!
     update!(known: true)
+
+    unless local? || !Setting.auto_mark_known || domain == username
+      _instance_actor = Account.find_remote(domain, domain)
+      return if _instance_actor.nil? || _instance_actor.known?
+
+      _instance_actor.mark_known!
+    end
   end
 
   def force_unlisted!