add distributability check to reblog worker

staging
multiple creatures 2019-08-07 01:51:02 -05:00
parent ef04f3879a
commit 72592b3c9c
1 changed files with 1 additions and 1 deletions

View File

@ -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