0
0
Fork 0

Fix reblogs being discarded after the reblogged status (#19731)

This commit is contained in:
Claire 2022-11-04 16:31:44 +01:00 committed by GitHub
parent e02812d5b6
commit c2170991c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 6 deletions

View file

@ -77,7 +77,7 @@ class Api::V1::StatusesController < Api::BaseController
@status = Status.where(account: current_account).find(params[:id])
authorize @status, :destroy?
@status.discard
@status.discard_with_reblogs
StatusPin.find_by(status: @status)&.destroy
@status.account.statuses_count = @status.account.statuses_count - 1
json = render_to_body json: @status, serializer: REST::StatusSerializer, source_requested: true