From 156af70e4d01f8bf65cdede554c37ab8f9817036 Mon Sep 17 00:00:00 2001 From: Takeshi Umeda Date: Mon, 27 Jul 2020 06:58:36 +0900 Subject: [PATCH 1/2] Fix following restriction not working when exact match in account search (#14394) --- app/services/account_search_service.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb index 493813aab..43e596040 100644 --- a/app/services/account_search_service.rb +++ b/app/services/account_search_service.rb @@ -27,7 +27,7 @@ class AccountSearchService < BaseService return @exact_match if defined?(@exact_match) - @exact_match = begin + match = begin if options[:resolve] ResolveAccountService.new.call(query) elsif domain_is_local? @@ -36,6 +36,10 @@ class AccountSearchService < BaseService Account.find_remote(query_username, query_domain) end end + + match = nil if !match.nil? && !account.nil? && options[:following] && !account.following?(match) + + @exact_match = match end def search_results From 93dd413a47f828f386d84cc1c7db15536c4d80c3 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 27 Jul 2020 00:07:26 +0200 Subject: [PATCH 2/2] Bump version to 3.2.0 (#14395) --- CHANGELOG.md | 3 ++- lib/mastodon/version.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c136f58f5..18790e860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ Changelog All notable changes to this project will be documented in this file. -## Unreleased +## [3.2.0] - 2020-07-27 ### Added - Add `SMTP_SSL` environment variable ([OmmyZhang](https://github.com/tootsuite/mastodon/pull/14309)) @@ -89,6 +89,7 @@ All notable changes to this project will be documented in this file. ### Fixed +- Fix `following` param not working when exact match is found in account search ([noellabo](https://github.com/tootsuite/mastodon/pull/14394)) - Fix sometimes occuring duplicate mention notifications ([noellabo](https://github.com/tootsuite/mastodon/pull/14378)) - Fix RSS feeds not being cachable ([ThibG](https://github.com/tootsuite/mastodon/pull/14368)) - Fix lack of locking around processing of Announce activities in ActivityPub ([noellabo](https://github.com/tootsuite/mastodon/pull/14365)) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 8df361373..7aa6cb2c7 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -17,7 +17,7 @@ module Mastodon end def flags - 'rc2' + '' end def suffix