0
0
Fork 0

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
This commit is contained in:
Ariel 2020-07-19 12:04:02 -03:00 committed by GitHub
parent 101485a41f
commit 2ada2ae18a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 8 deletions

View file

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