diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-09-18 11:55:52 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-09-18 11:55:52 -0500 |
commit | c54ea07628fbf6a4e9360585cf775f70f871e3e9 (patch) | |
tree | 168607204bc873629a29525ff7b13d006b8ab73d /app/controllers/api | |
parent | e56e3d187f8ddd3db72fc90c5d200f552d5c1c04 (diff) |
[Bug] Properly discard originals when redrafting in manual publishing mode
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/v1/statuses_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index ca40fac0a..a7ebbd014 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -100,7 +100,7 @@ class Api::V1::StatusesController < Api::BaseController @status = Status.where(account_id: current_user.account).find(params[:id]) authorize @status, :destroy? - if !(current_user.setting_unpublish_on_delete && @status.published?) || truthy_param?(:redraft) + if !current_user.setting_unpublish_on_delete || !@status.published? || truthy_param?(:redraft) @status.discard RemovalWorker.perform_async(@status.id, redraft: true) @status.account.statuses_count = @status.account.statuses_count - 1 |