Fix public timeline query

lolsob-rspec
Eugen Rochko 2016-11-10 21:58:22 +01:00
parent 6430d86e86
commit d8c2044e65
1 changed files with 1 additions and 1 deletions

View File

@ -126,8 +126,8 @@ class Status < ApplicationRecord
query query
.joins('LEFT OUTER JOIN statuses AS parents ON statuses.in_reply_to_id = parents.id') .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') .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('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) .where('(reblogs.id IS NULL OR reblogs.account_id NOT IN (?))', blocked)
end end
end end