From 40101fc7aea5cb30fa1b00cbf208dd4644199c0d Mon Sep 17 00:00:00 2001 From: noellabo Date: Sat, 18 Jul 2020 23:58:42 +0900 Subject: [PATCH] Fix RemoveStatusService status.reblog --- app/services/remove_status_service.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/services/remove_status_service.rb b/app/services/remove_status_service.rb index 21ddc7154..3b9b7e304 100644 --- a/app/services/remove_status_service.rb +++ b/app/services/remove_status_service.rb @@ -11,11 +11,11 @@ class RemoveStatusService < BaseService # @option [Boolean] :immediate # @option [Boolean] :original_removed def call(status, **options) - @payload = Oj.dump(event: :delete, payload: status.id.to_s) - @reblog_payload = Oj.dump(event: :delete, payload: status.reblog.id.to_s) - @status = status - @account = status.account - @options = options + @payload = Oj.dump(event: :delete, payload: status.id.to_s) + @reblog_payload = Oj.dump(event: :delete, payload: status.reblog.id.to_s) if status.reblog + @status = status + @account = status.account + @options = options @status.discard