mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-26 15:31:52 +00:00
Fix direct inbox delivery pushing posts into inactive followers' timelines (#33067)
This commit is contained in:
parent
2d8fed23e6
commit
9a7130d6da
|
@ -58,6 +58,7 @@ class FeedManager
|
||||||
# @param [Boolean] update
|
# @param [Boolean] update
|
||||||
# @return [Boolean]
|
# @return [Boolean]
|
||||||
def push_to_home(account, status, update: false)
|
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?)
|
return false unless add_to_feed(:home, account.id, status, aggregate_reblogs: account.user&.aggregates_reblogs?)
|
||||||
|
|
||||||
trim(:home, account.id)
|
trim(:home, account.id)
|
||||||
|
@ -83,7 +84,9 @@ class FeedManager
|
||||||
# @param [Boolean] update
|
# @param [Boolean] update
|
||||||
# @return [Boolean]
|
# @return [Boolean]
|
||||||
def push_to_list(list, status, update: false)
|
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?)
|
return false if filter_from_list?(status, list)
|
||||||
|
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?)
|
||||||
|
|
||||||
trim(:list, list.id)
|
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}")
|
PushUpdateWorker.perform_async(list.account_id, status.id, "timeline:list:#{list.id}", { 'update' => update }) if push_update_required?("timeline:list:#{list.id}")
|
||||||
|
|
|
@ -165,6 +165,10 @@ class User < ApplicationRecord
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def signed_in_recently?
|
||||||
|
current_sign_in_at.present? && current_sign_in_at >= ACTIVE_DURATION.ago
|
||||||
|
end
|
||||||
|
|
||||||
def confirmed?
|
def confirmed?
|
||||||
confirmed_at.present?
|
confirmed_at.present?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user