From 8cc3f549e6cec2fdcb15104e5ec50bb29aef5d18 Mon Sep 17 00:00:00 2001 From: Fosco Marotto Date: Fri, 22 Jan 2021 00:06:14 -0500 Subject: [PATCH] [home feed] Another fix. --- app/models/home_feed.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/home_feed.rb b/app/models/home_feed.rb index d8302cfe..ffa0926b 100644 --- a/app/models/home_feed.rb +++ b/app/models/home_feed.rb @@ -26,6 +26,8 @@ class HomeFeed < Feed select st.* from ( select s.* from statuses s + left join statuses reblog + on s.reblog_of_id = reblog.id where s.created_at > NOW() - INTERVAL '7 days' and s.reply is false @@ -34,6 +36,8 @@ class HomeFeed < Feed or s.account_id in (select target_account_id from follows where account_id = #{@id}) ) and s.account_id not in (select target_account_id from mutes where account_id = #{@id}) + and reblog.account_id not in (select target_account_id from mutes where account_id = #{@id}) + and reblog.account_id not in (select target_account_id from blocks where account_id = #{@id}) #{pagination_max} #{pagination_min} order by s.created_at desc