about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-10 21:58:22 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-10 21:58:22 +0100
commit0320ea4b85adab1d5a84613df42120aebe224fab (patch)
tree630352125d04be862b215a3d0d4ed515ada8864c
parent36921be9aa6f4ef68d969ee2a1c49b63a37d4d2a (diff)
Fix public timeline query
-rw-r--r--app/models/status.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 08b5e2cab..9e2711008 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