Make sure that replies that are not sections of a root thread get filtered out of the world timeline.
parent
89ad628e88
commit
cec0a7ff3c
|
@ -22,7 +22,7 @@ class FanOutOnWriteService < BaseService
|
||||||
end
|
end
|
||||||
|
|
||||||
return if status.reblog? && !Setting.show_reblogs_in_public_timelines
|
return if status.reblog? && !Setting.show_reblogs_in_public_timelines
|
||||||
return if status.account.silenced?
|
return if filtered?(status)
|
||||||
|
|
||||||
if !status.reblog? && status.distributable?
|
if !status.reblog? && status.distributable?
|
||||||
deliver_to_hashtags(status)
|
deliver_to_hashtags(status)
|
||||||
|
@ -31,18 +31,21 @@ class FanOutOnWriteService < BaseService
|
||||||
|
|
||||||
if status.relayed?
|
if status.relayed?
|
||||||
status = Status.find(status.reblog_of_id)
|
status = Status.find(status.reblog_of_id)
|
||||||
return if status.account.silenced?
|
return if filtered?(status)
|
||||||
render_anonymous_payload(status)
|
render_anonymous_payload(status)
|
||||||
end
|
end
|
||||||
|
|
||||||
return unless status.network? && status.public_visibility? && !status.reblog
|
return unless status.network? && status.public_visibility? && !status.reblog
|
||||||
return if status.reply? && status.in_reply_to_account_id != status.account_id && !Setting.show_replies_in_public_timelines
|
|
||||||
|
|
||||||
deliver_to_local(status)
|
deliver_to_local(status)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def filtered?(status)
|
||||||
|
status.account.silenced? || !Setting.show_replies_in_public_timelines && status.reply? && status.in_reply_to_account_id != status.account_id
|
||||||
|
end
|
||||||
|
|
||||||
def deliver_to_self(status)
|
def deliver_to_self(status)
|
||||||
Rails.logger.debug "Delivering status #{status.id} to author"
|
Rails.logger.debug "Delivering status #{status.id} to author"
|
||||||
FeedManager.instance.push_to_home(status.account, status)
|
FeedManager.instance.push_to_home(status.account, status)
|
||||||
|
|
Loading…
Reference in New Issue