Browse Source

Fix the sample account icon of Profile directory to local only (#11872)

pull/4/head
mayaeh 4 years ago
committed by Eugen Rochko
parent
commit
0e5b9e3ba0
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/models/tag.rb
  2. +1
    -1
      app/presenters/instance_presenter.rb

+ 1
- 1
app/models/tag.rb View 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

+ 1
- 1
app/presenters/instance_presenter.rb View 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

Loading…
Cancel
Save