about summary refs log tree commit diff
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-08-07 01:51:02 -0500
committermultiple creatures <dev@multiple-creature.party>2019-08-07 01:51:02 -0500
commit72592b3c9c66b88fca117f38d4bddb662ecb641e (patch)
treeba790526c4acd51cea7294e2c20e8fd1dc5a7371
parentef04f3879ac3bd7ec6dddd6cb843c8cdb79a1175 (diff)
add distributability check to reblog worker
-rw-r--r--app/workers/reblog_status_worker.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/reblog_status_worker.rb b/app/workers/reblog_status_worker.rb
index c0b2153b2..250041a7d 100644
--- a/app/workers/reblog_status_worker.rb
+++ b/app/workers/reblog_status_worker.rb
@@ -8,7 +8,7 @@ class ReblogStatusWorker
   def perform(account_id, status_id, reblog_params = {})
     account = Account.find(account_id)
     status = Status.find(status_id)
-    return false if status.destroyed?
+    return false if status.destroyed? || !status.distributable?
     ReblogService.new.call(account, status, reblog_params.symbolize_keys)
     true
   rescue ActiveRecord::RecordNotFound, ActiveRecord::RecordInvalid