From 72592b3c9c66b88fca117f38d4bddb662ecb641e Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Wed, 7 Aug 2019 01:51:02 -0500 Subject: [PATCH] add distributability check to reblog worker --- app/workers/reblog_status_worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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