From a1519a8ef564ed3773f3a0d1613cbe1c5d6f8459 Mon Sep 17 00:00:00 2001 From: ThibG Date: Sat, 18 May 2019 00:28:51 +0200 Subject: Prevent from publicly boosting one's own private toots (#10775) --- app/services/reblog_service.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/services/reblog_service.rb b/app/services/reblog_service.rb index ff48d9c75..1710640c8 100644 --- a/app/services/reblog_service.rb +++ b/app/services/reblog_service.rb @@ -18,7 +18,9 @@ class ReblogService < BaseService return reblog unless reblog.nil? - reblog = account.statuses.create!(reblog: reblogged_status, text: '', visibility: options[:visibility] || account.user&.setting_default_privacy) + visibility = options[:visibility] || account.user&.setting_default_privacy + visibility = reblogged_status.visibility if reblogged_status.hidden? + reblog = account.statuses.create!(reblog: reblogged_status, text: '', visibility: visibility) DistributionWorker.perform_async(reblog.id) Pubsubhubbub::DistributionWorker.perform_async(reblog.stream_entry.id) -- cgit