From b5c6d00afae53dca1b6abd405556d58557ea7e1a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 17 Oct 2016 01:23:41 +0200 Subject: Fix #99 - public timeline not just reblogs, fix #98 infinite scrolling issues --- app/models/status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/status.rb') diff --git a/app/models/status.rb b/app/models/status.rb index 58b2cb1f3..f2935fea9 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -86,7 +86,7 @@ class Status < ApplicationRecord end def self.as_public_timeline(account) - joins('LEFT JOIN statuses AS reblogs ON reblogs.id = statuses.reblog_of_id').where('reblogs.account_id NOT IN (SELECT target_account_id FROM blocks WHERE account_id = ?) AND statuses.account_id NOT IN (SELECT target_account_id FROM blocks WHERE account_id = ?)', account.id, account.id).with_includes.with_counters + joins('LEFT OUTER JOIN statuses AS reblogs ON reblogs.id = statuses.reblog_of_id').where('reblogs.account_id NOT IN (SELECT target_account_id FROM blocks WHERE account_id = ?) AND statuses.account_id NOT IN (SELECT target_account_id FROM blocks WHERE account_id = ?)', account.id, account.id).with_includes.with_counters end def self.favourites_map(status_ids, account_id) -- cgit