about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-05-18 00:28:51 +0200
committerEugen Rochko <eugen@zeonfederated.com>2019-05-18 00:28:51 +0200
commita1519a8ef564ed3773f3a0d1613cbe1c5d6f8459 (patch)
treeef4cbaa1e98361ed4294d5582e4035259fd3dd4a /app/services
parente976a9dfbd33a5ac373dc1dd633df203b4b08ffe (diff)
Prevent from publicly boosting one's own private toots (#10775)
Diffstat (limited to 'app/services')
-rw-r--r--app/services/reblog_service.rb4
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)