mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-20 17:23:17 +00:00
Change API behavior of reblogs wrt. quotes for consistency (#36559)
This commit is contained in:
parent
3bf99b8a4a
commit
4b42fe6aba
4 changed files with 28 additions and 4 deletions
|
|
@ -157,7 +157,7 @@ class Api::V1::StatusesController < Api::BaseController
|
|||
end
|
||||
|
||||
def set_quoted_status
|
||||
@quoted_status = Status.find(status_params[:quoted_status_id]) if status_params[:quoted_status_id].present?
|
||||
@quoted_status = Status.find(status_params[:quoted_status_id])&.proper if status_params[:quoted_status_id].present?
|
||||
authorize(@quoted_status, :quote?) if @quoted_status.present?
|
||||
rescue ActiveRecord::RecordNotFound, Mastodon::NotPermittedError
|
||||
# TODO: distinguish between non-existing and non-quotable posts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue