From 487c945d160e9349579bf541147c949f8bca3c46 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sat, 16 Nov 2019 07:23:52 -0600 Subject: Searches now work on `following` scope. --- app/models/status.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/status.rb b/app/models/status.rb index 045a4a31a..29c4f6bd1 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -344,9 +344,8 @@ class Status < ApplicationRecord term = term.split(nil, 2)[1] query = account.statuses else - mutual_account_ids = account.following_ids & account.follower_ids query = Status.where(account_id: account.id) - .or(Status.where(account_id: mutual_account_ids, visibility: [:private, :local, :unlisted])) + .or(Status.where(account_id: account.following, visibility: [:private, :local, :unlisted])) .or(Status.where(id: account.mentions.select(:status_id))) end return none if term.blank? || term.length < 3 -- cgit