Merge commit '13ab4b54e2
' into upstream-20241204-15
This commit is contained in:
commit
a6a237bc8e
228 changed files with 2678 additions and 1266 deletions
|
@ -58,6 +58,7 @@ class FeedManager
|
|||
# @param [Boolean] update
|
||||
# @return [Boolean]
|
||||
def push_to_home(account, status, update: false)
|
||||
return false unless account.user&.signed_in_recently?
|
||||
return false unless add_to_feed(:home, account.id, status, aggregate_reblogs: account.user&.aggregates_reblogs?, update: update)
|
||||
|
||||
trim(:home, account.id)
|
||||
|
@ -84,6 +85,8 @@ class FeedManager
|
|||
# @return [Boolean]
|
||||
def push_to_list(list, status, update: false)
|
||||
return false if filter_from_list?(status, list) || !add_to_feed(:list, list.id, status, aggregate_reblogs: list.account.user&.aggregates_reblogs?, update: update)
|
||||
return false unless list.account.user&.signed_in_recently?
|
||||
return false unless add_to_feed(:list, list.id, status, aggregate_reblogs: list.account.user&.aggregates_reblogs?, update: update)
|
||||
|
||||
trim(:list, list.id)
|
||||
PushUpdateWorker.perform_async(list.account_id, status.id, "timeline:list:#{list.id}", { 'update' => update }) if push_update_required?("timeline:list:#{list.id}")
|
||||
|
@ -122,6 +125,8 @@ class FeedManager
|
|||
# @param [Account] into_account
|
||||
# @return [void]
|
||||
def merge_into_home(from_account, into_account)
|
||||
return unless into_account.user&.signed_in_recently?
|
||||
|
||||
timeline_key = key(:home, into_account.id)
|
||||
aggregate = into_account.user&.aggregates_reblogs?
|
||||
query = from_account.statuses.list_eligible_visibility.includes(:preloadable_poll, :media_attachments, reblog: :account).limit(FeedManager::MAX_ITEMS / 4)
|
||||
|
@ -148,6 +153,8 @@ class FeedManager
|
|||
# @param [List] list
|
||||
# @return [void]
|
||||
def merge_into_list(from_account, list)
|
||||
return unless list.account.user&.signed_in_recently?
|
||||
|
||||
timeline_key = key(:list, list.id)
|
||||
aggregate = list.account.user&.aggregates_reblogs?
|
||||
query = from_account.statuses.list_eligible_visibility.includes(:preloadable_poll, :media_attachments, reblog: :account).limit(FeedManager::MAX_ITEMS / 4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue