0
0
Fork 0

Change public timelines to be filtered by current locale by default (#19291)

In the absence of an opt-in to multiple specific languages in the
preferences, it makes more sense to filter by the user's presumed
language only (interface language or `lang` override)
This commit is contained in:
Eugen Rochko 2022-10-05 03:48:06 +02:00 committed by GitHub
parent d2528b26b6
commit 9f65909f42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 18 deletions

View file

@ -251,22 +251,6 @@ RSpec.describe Status, type: :model do
end
end
describe '.in_chosen_languages' do
context 'for accounts with language filters' do
let(:user) { Fabricate(:user, chosen_languages: ['en']) }
it 'does not include statuses in not in chosen languages' do
status = Fabricate(:status, language: 'de')
expect(Status.in_chosen_languages(user.account)).not_to include status
end
it 'includes status with unknown language' do
status = Fabricate(:status, language: nil)
expect(Status.in_chosen_languages(user.account)).to include status
end
end
end
describe '.tagged_with' do
let(:tag1) { Fabricate(:tag) }
let(:tag2) { Fabricate(:tag) }