From 2ada2ae18af3429f9666fd35c70675dc62a0b99f Mon Sep 17 00:00:00 2001 From: Ariel Date: Sun, 19 Jul 2020 12:04:02 -0300 Subject: Fix/14021 behaviour on add or remove toots (#14212) * Add toot send by current user at local state after send a new toot Related to #14021 * Decrement toot counter at profile when remove a toot Related to #14021 * Remove semicolon at end of line --- app/controllers/api/v1/statuses_controller.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/controllers/api/v1/statuses_controller.rb') diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index 8d6cb84b6..106fc8224 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -57,6 +57,7 @@ class Api::V1::StatusesController < Api::BaseController @status.discard RemovalWorker.perform_async(@status.id, redraft: true) + @status.account.statuses_count = @status.account.statuses_count - 1 render json: @status, serializer: REST::StatusSerializer, source_requested: true end -- cgit