[home feed] Another fix.

This commit is contained in:
Fosco Marotto 2021-01-22 00:06:14 -05:00
parent 94a04d3b54
commit 8cc3f549e6
1 changed files with 4 additions and 0 deletions

View File

@ -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