mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-28 13:47:23 +00:00
Conflicts: - `app/lib/feed_manager.rb`: Not a real conflict, but glitch-soc has an extra `populate_direct_feed` method. Added upstream's code. In addition, upstream changed how notifications from follow subscriptions were handled, refactoring this file in the process. Ported upstream's changes. - `app/services/precompute_feed_service.rb`: Not a real conflict, glitch-soc has extra code for the direct feed. Added upstream's new code for populating lists. - `app/validators/poll_options_validator.rb`: Upstream split `PollValidator` in two, and glitch-soc had local changes to make the options configurable. Refactored as upstream did, keeping glitch-soc's configurable limits. - `app/workers/feed_insert_worker.rb`: Upstream changed how notifications from follow subscriptions were handled, refactoring this file in the process. Conflict is due to glitch-soc having an extra timeline type (direct). Ported upstream's changes.
17 lines
383 B
Ruby
17 lines
383 B
Ruby
# frozen_string_literal: true
|
|
|
|
class PrecomputeFeedService < BaseService
|
|
include Redisable
|
|
|
|
def call(account)
|
|
FeedManager.instance.populate_home(account)
|
|
FeedManager.instance.populate_direct_feed(account)
|
|
|
|
account.owned_lists.each do |list|
|
|
FeedManager.instance.populate_list(list)
|
|
end
|
|
ensure
|
|
redis.del("account:#{account.id}:regeneration")
|
|
end
|
|
end
|