diff options
author | ThibG <thib@sitedethib.com> | 2019-05-18 00:28:51 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-05-18 00:28:51 +0200 |
commit | a1519a8ef564ed3773f3a0d1613cbe1c5d6f8459 (patch) | |
tree | ef4cbaa1e98361ed4294d5582e4035259fd3dd4a /app | |
parent | e976a9dfbd33a5ac373dc1dd633df203b4b08ffe (diff) |
Prevent from publicly boosting one's own private toots (#10775)
Diffstat (limited to 'app')
-rw-r--r-- | app/services/reblog_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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) |