Replies should not exceed the visibility being replied to.
parent
feea4f6dc0
commit
59fd9c25dc
|
@ -52,8 +52,15 @@ class PostStatusService < BaseService
|
||||||
@text = '.'
|
@text = '.'
|
||||||
@text = @media.find(&:video?) ? '📹' : '🖼' if @media.size > 0
|
@text = @media.find(&:video?) ? '📹' : '🖼' if @media.size > 0
|
||||||
end
|
end
|
||||||
|
|
||||||
@visibility = @options[:visibility] || @account.user&.setting_default_privacy
|
@visibility = @options[:visibility] || @account.user&.setting_default_privacy
|
||||||
@visibility = :unlisted if @visibility == :public && @account.silenced?
|
@visibility = :unlisted if @visibility == :public && @account.silenced?
|
||||||
|
|
||||||
|
if @in_reply_to.present?
|
||||||
|
v = %w(public unlisted private direct limited)
|
||||||
|
@visibility = @in_reply_to.visibility if v.index(@visibility) < v.index(@in_reply_to.visibility)
|
||||||
|
end
|
||||||
|
|
||||||
@scheduled_at = @options[:scheduled_at]&.to_datetime
|
@scheduled_at = @options[:scheduled_at]&.to_datetime
|
||||||
@scheduled_at = nil if scheduled_in_the_past?
|
@scheduled_at = nil if scheduled_in_the_past?
|
||||||
rescue ArgumentError
|
rescue ArgumentError
|
||||||
|
|
Loading…
Reference in New Issue