Skip to content

Commit 216a39b

Browse files
mayaehhiyuki2578
authored andcommitted
Fix the sample account icon of Profile directory to local only (mastodon#11872)
1 parent ad3407a commit 216a39b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/models/tag.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class Tag < ApplicationRecord
2121
has_and_belongs_to_many :statuses
2222
has_and_belongs_to_many :accounts
23-
has_and_belongs_to_many :sample_accounts, -> { searchable.discoverable.popular.limit(3) }, class_name: 'Account'
23+
has_and_belongs_to_many :sample_accounts, -> { local.discoverable.popular.limit(3) }, class_name: 'Account'
2424

2525
has_many :featured_tags, dependent: :destroy, inverse_of: :tag
2626
has_one :account_tag_stat, dependent: :destroy

app/presenters/instance_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def domain_count
3333
end
3434

3535
def sample_accounts
36-
Rails.cache.fetch('sample_accounts', expires_in: 12.hours) { Account.discoverable.popular.limit(3) }
36+
Rails.cache.fetch('sample_accounts', expires_in: 12.hours) { Account.local.discoverable.popular.limit(3) }
3737
end
3838

3939
def version_number

0 commit comments

Comments
 (0)