]> cat aescling's git repositories - mastodon.git/commitdiff
Fix the sample account icon of Profile directory to local only (#11872)
authormayaeh <mayaeh@marimo-net.org>
Tue, 17 Sep 2019 08:06:43 +0000 (17:06 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 17 Sep 2019 08:06:43 +0000 (10:06 +0200)
app/models/tag.rb
app/presenters/instance_presenter.rb

index 4e77c404ddfde0cd3b636d7169e369c0922825b7..b52b9bc9fa21d1518fd70aba304648cf17f277fe 100644 (file)
@@ -20,7 +20,7 @@
 class Tag < ApplicationRecord
   has_and_belongs_to_many :statuses
   has_and_belongs_to_many :accounts
-  has_and_belongs_to_many :sample_accounts, -> { searchable.discoverable.popular.limit(3) }, class_name: 'Account'
+  has_and_belongs_to_many :sample_accounts, -> { local.discoverable.popular.limit(3) }, class_name: 'Account'
 
   has_many :featured_tags, dependent: :destroy, inverse_of: :tag
   has_one :account_tag_stat, dependent: :destroy
index f3a73209afe56658c78372d3f2b272e5fbcdd10b..becc92c2d1995bf8ce9e78aeaf86a5471ef1f3f3 100644 (file)
@@ -33,7 +33,7 @@ class InstancePresenter
   end
 
   def sample_accounts
-    Rails.cache.fetch('sample_accounts', expires_in: 12.hours) { Account.discoverable.popular.limit(3) }
+    Rails.cache.fetch('sample_accounts', expires_in: 12.hours) { Account.local.discoverable.popular.limit(3) }
   end
 
   def version_number