summaryrefslogtreecommitdiffstats
path: root/app/controllers/api
diff options
context:
space:
mode:
authorAriel <arielrodrigues@protonmail.com>2020-07-19 12:04:02 -0300
committerGitHub <noreply@github.com>2020-07-19 17:04:02 +0200
commit2ada2ae18af3429f9666fd35c70675dc62a0b99f (patch)
treed4bd1f8e13ad9a13a28801ceef14fcbec17dc0e7 /app/controllers/api
parent101485a41fb2ea326496142d9ccb368522cbe0f0 (diff)
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
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/statuses_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb
index 8d6cb84b667..106fc8224e2 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