about summary refs log tree commit diff
path: root/app/services/remove_status_service.rb
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-10-21 20:22:30 -0500
committerFire Demon <firedemon@creature.cafe>2020-10-21 20:22:30 -0500
commitca02e60f4f5dab0e53d3d17a3ee5a760c05d6fdd (patch)
tree866a409438b4bcc62f0f441aeb825d6c7556ec97 /app/services/remove_status_service.rb
parent5a94cc667bac854a05261bedac7ce85a7ed73953 (diff)
Limit unpublishing to local posts
Diffstat (limited to 'app/services/remove_status_service.rb')
-rw-r--r--app/services/remove_status_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/remove_status_service.rb b/app/services/remove_status_service.rb
index d7bd2ae39..c0055882d 100644
--- a/app/services/remove_status_service.rb
+++ b/app/services/remove_status_service.rb
@@ -33,7 +33,7 @@ class RemoveStatusService < BaseService
         remove_from_spam_check unless @options[:unpublish]
         remove_media unless @options[:unpublish]
 
-        @status.destroy! if @options[:immediate] || !(@options[:unpublish] || @status.reported?)
+        @status.destroy! if @options[:immediate] || !((@options[:unpublish] && @status.local?) || @status.reported?)
       else
         raise Mastodon::RaceConditionError
       end