From d8c2044e65e72ea4882e681321dccd3fc6759709 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 10 Nov 2016 21:58:22 +0100 Subject: [PATCH] Fix public timeline query --- app/models/status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/status.rb b/app/models/status.rb index 08b5e2cabe..9e27110083 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -126,8 +126,8 @@ class Status < ApplicationRecord query .joins('LEFT OUTER JOIN statuses AS parents ON statuses.in_reply_to_id = parents.id') .joins('LEFT OUTER JOIN statuses AS reblogs ON statuses.reblog_of_id = reblogs.id') - .where('parents.account_id NOT IN (?)', blocked) .where('statuses.account_id NOT IN (?)', blocked) + .where('(parents.id IS NULL OR parents.account_id NOT IN (?))', blocked) .where('(reblogs.id IS NULL OR reblogs.account_id NOT IN (?))', blocked) end end