From 9f65909f42c14d1e56c5f916eb76b156709ac147 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 5 Oct 2022 03:48:06 +0200 Subject: 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) --- app/controllers/api/v1/timelines/public_controller.rb | 1 + app/controllers/api/v1/timelines/tag_controller.rb | 1 + 2 files changed, 2 insertions(+) (limited to 'app/controllers/api/v1/timelines') diff --git a/app/controllers/api/v1/timelines/public_controller.rb b/app/controllers/api/v1/timelines/public_controller.rb index d253b744f..15b91d63e 100644 --- a/app/controllers/api/v1/timelines/public_controller.rb +++ b/app/controllers/api/v1/timelines/public_controller.rb @@ -35,6 +35,7 @@ class Api::V1::Timelines::PublicController < Api::BaseController def public_feed PublicFeed.new( current_account, + locale: content_locale, local: truthy_param?(:local), remote: truthy_param?(:remote), only_media: truthy_param?(:only_media) diff --git a/app/controllers/api/v1/timelines/tag_controller.rb b/app/controllers/api/v1/timelines/tag_controller.rb index 64a1db58d..9f3a5b3f1 100644 --- a/app/controllers/api/v1/timelines/tag_controller.rb +++ b/app/controllers/api/v1/timelines/tag_controller.rb @@ -36,6 +36,7 @@ class Api::V1::Timelines::TagController < Api::BaseController TagFeed.new( @tag, current_account, + locale: content_locale, any: params[:any], all: params[:all], none: params[:none], -- cgit From 26478f461cafc42d39bc0baf235989e1df7ee0bb Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 30 Oct 2022 21:29:23 +0100 Subject: Remove language filtering from hashtag timelines (#19563) --- app/controllers/api/v1/timelines/tag_controller.rb | 1 - app/models/tag_feed.rb | 1 - 2 files changed, 2 deletions(-) (limited to 'app/controllers/api/v1/timelines') diff --git a/app/controllers/api/v1/timelines/tag_controller.rb b/app/controllers/api/v1/timelines/tag_controller.rb index 9f3a5b3f1..64a1db58d 100644 --- a/app/controllers/api/v1/timelines/tag_controller.rb +++ b/app/controllers/api/v1/timelines/tag_controller.rb @@ -36,7 +36,6 @@ class Api::V1::Timelines::TagController < Api::BaseController TagFeed.new( @tag, current_account, - locale: content_locale, any: params[:any], all: params[:all], none: params[:none], diff --git a/app/models/tag_feed.rb b/app/models/tag_feed.rb index 58216bddc..8502b79af 100644 --- a/app/models/tag_feed.rb +++ b/app/models/tag_feed.rb @@ -33,7 +33,6 @@ class TagFeed < PublicFeed scope.merge!(remote_only_scope) if remote_only? scope.merge!(account_filters_scope) if account? scope.merge!(media_only_scope) if media_only? - scope.merge!(language_scope) scope.cache_ids.to_a_paginated_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id) end -- cgit