From 2ab2e0f6e205a739a95b1dcd1b17f41b8410de6c Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 7 Mar 2024 08:25:22 +0900 Subject: [PATCH] =?UTF-8?q?Revert=E3=81=97=E3=81=9F=E3=82=B3=E3=83=9F?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=81=AB=E6=B3=A8=E6=84=8F=E6=9B=B8=E3=81=8D?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/account_suggestions/friends_of_friends_source.rb | 5 +++++ app/models/account_suggestions/similar_profiles_source.rb | 5 +++++ app/models/account_suggestions/source.rb | 5 +++++ .../account_suggestions/friends_of_friends_source_spec.rb | 6 ++++++ spec/models/account_suggestions/source_spec.rb | 5 +++++ 5 files changed, 26 insertions(+) create mode 100644 spec/models/account_suggestions/friends_of_friends_source_spec.rb diff --git a/app/models/account_suggestions/friends_of_friends_source.rb b/app/models/account_suggestions/friends_of_friends_source.rb index 93fb10f3b064c6..879c2cc8e56949 100644 --- a/app/models/account_suggestions/friends_of_friends_source.rb +++ b/app/models/account_suggestions/friends_of_friends_source.rb @@ -1,5 +1,10 @@ # frozen_string_literal: true +# Reverted this commit.temporarily because load issues. +# Whenever a manual merge occurs, be sure to check the following commits. +# Hash: ee8d0b94473df357677cd1f82581251ce0423c01 +# Message: Fix follow suggestions potentially including silenced or blocked accounts (#29306) + class AccountSuggestions::FriendsOfFriendsSource < AccountSuggestions::Source def get(account, limit: DEFAULT_LIMIT) Account.find_by_sql([<<~SQL.squish, { id: account.id, limit: limit }]).map { |row| [row.id, key] } diff --git a/app/models/account_suggestions/similar_profiles_source.rb b/app/models/account_suggestions/similar_profiles_source.rb index 3ece20aa5133eb..cf1b65d832506f 100644 --- a/app/models/account_suggestions/similar_profiles_source.rb +++ b/app/models/account_suggestions/similar_profiles_source.rb @@ -1,5 +1,10 @@ # frozen_string_literal: true +# Reverted this commit.temporarily because load issues. +# Whenever a manual merge occurs, be sure to check the following commits. +# Hash: ee8d0b94473df357677cd1f82581251ce0423c01 +# Message: Fix follow suggestions potentially including silenced or blocked accounts (#29306) + class AccountSuggestions::SimilarProfilesSource < AccountSuggestions::Source class QueryBuilder < AccountSearchService::QueryBuilder def must_clauses diff --git a/app/models/account_suggestions/source.rb b/app/models/account_suggestions/source.rb index b2c3c7a3a24af4..3e0fb3782eb97e 100644 --- a/app/models/account_suggestions/source.rb +++ b/app/models/account_suggestions/source.rb @@ -1,5 +1,10 @@ # frozen_string_literal: true +# Reverted this commit.temporarily because load issues. +# Whenever a manual merge occurs, be sure to check the following commits. +# Hash: ee8d0b94473df357677cd1f82581251ce0423c01 +# Message: Fix follow suggestions potentially including silenced or blocked accounts (#29306) + class AccountSuggestions::Source DEFAULT_LIMIT = 10 diff --git a/spec/models/account_suggestions/friends_of_friends_source_spec.rb b/spec/models/account_suggestions/friends_of_friends_source_spec.rb new file mode 100644 index 00000000000000..6868d51faf2040 --- /dev/null +++ b/spec/models/account_suggestions/friends_of_friends_source_spec.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +# Reverted this commit.temporarily because load issues. +# Whenever a manual merge occurs, be sure to check the following commits. +# Hash: ee8d0b94473df357677cd1f82581251ce0423c01 +# Message: Fix follow suggestions potentially including silenced or blocked accounts (#29306) diff --git a/spec/models/account_suggestions/source_spec.rb b/spec/models/account_suggestions/source_spec.rb index d8227e01bc982a..d6f979d765d5f5 100644 --- a/spec/models/account_suggestions/source_spec.rb +++ b/spec/models/account_suggestions/source_spec.rb @@ -1,5 +1,10 @@ # frozen_string_literal: true +# Reverted this commit.temporarily because load issues. +# Whenever a manual merge occurs, be sure to check the following commits. +# Hash: ee8d0b94473df357677cd1f82581251ce0423c01 +# Message: Fix follow suggestions potentially including silenced or blocked accounts (#29306) + require 'rails_helper' RSpec.describe AccountSuggestions::Source do