diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-12-03 18:21:26 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-12-03 18:21:26 +0100 |
commit | 816284d73924ceb453c76d571bcb315be91b2b08 (patch) | |
tree | 2fbf97bed916b582600e333c591d74c40f308111 /app/models/feed.rb | |
parent | 253970cb736a4da29229b930a0af32ead7e5d99b (diff) |
Fix #248 - Reload all accounts when fetching from cache
Diffstat (limited to 'app/models/feed.rb')
-rw-r--r-- | app/models/feed.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/feed.rb b/app/models/feed.rb index 7b181d529..5e1905e15 100644 --- a/app/models/feed.rb +++ b/app/models/feed.rb @@ -14,9 +14,9 @@ class Feed # If we're after most recent items and none are there, we need to precompute the feed if unhydrated.empty? && max_id == '+inf' && since_id == '-inf' RegenerationWorker.perform_async(@account.id, @type) - @statuses = Status.send("as_#{@type}_timeline", @account).paginate_by_max_id(limit, nil, nil) + @statuses = Status.send("as_#{@type}_timeline", @account).cache_ids.paginate_by_max_id(limit, nil, nil) else - status_map = Status.where(id: unhydrated).map { |s| [s.id, s] }.to_h + status_map = Status.where(id: unhydrated).cache_ids.map { |s| [s.id, s] }.to_h @statuses = unhydrated.map { |id| status_map[id] }.compact end |