[home] Home feed update to 21 days and always from database

This commit is contained in:
Fosco Marotto 2021-01-03 00:38:23 -05:00
parent ecb5c6554c
commit 46ceced444
2 changed files with 6 additions and 6 deletions

View File

@ -8,11 +8,11 @@ class HomeFeed < Feed
end
def get(limit, max_id = nil, since_id = nil, min_id = nil)
if redis.exists?("account:#{@account.id}:regeneration")
from_database(limit, max_id, since_id, min_id)
else
super
end
# if redis.exists?("account:#{@account.id}:regeneration")
from_database(limit, max_id, since_id, min_id)
# else
# super
# end
end
private

View File

@ -290,7 +290,7 @@ class Status < ApplicationRecord
end
def as_home_timeline(account)
query = where('created_at > ?', 10.days.ago)
query = where('created_at > ?', 21.days.ago)
query.where(visibility: [:public, :unlisted]).or(
where(visibility: [:private]).where('group is null')
).or(