0
0
Fork 0

Fix subscriptions:clear task, refactor feeds, refactor streamable activites

and atom feed generation to some extent, as well as the way mentions are
stored
This commit is contained in:
Eugen Rochko 2016-03-25 02:13:30 +01:00
parent 9594f0e858
commit a08e724476
24 changed files with 219 additions and 234 deletions

View file

@ -11,8 +11,8 @@ class AccountsController < ApplicationController
format.atom do
@entries = @account.stream_entries.order('id desc').with_includes.paginate_by_max_id(20, params[:max_id] || nil)
ActiveRecord::Associations::Preloader.new.preload(@entries.select { |a| a.activity_type == 'Status' }, activity: [:mentioned_accounts, reblog: :account, thread: :account])
ActiveRecord::Associations::Preloader.new.preload(@entries.select { |a| a.activity_type == 'Favourite' }, activity: [:account, :thread, :mentioned_accounts])
ActiveRecord::Associations::Preloader.new.preload(@entries.select { |a| a.activity_type == 'Status' }, activity: [:mentions, reblog: :account, thread: :account])
ActiveRecord::Associations::Preloader.new.preload(@entries.select { |a| a.activity_type == 'Favourite' }, activity: [:account, :status])
ActiveRecord::Associations::Preloader.new.preload(@entries.select { |a| a.activity_type == 'Follow' }, activity: :target_account)
end
end