Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/views/admin/trends/links/index.html.haml`: Not really a conflict, upstream change textually too close to a glitch-soc change (removed `javascript_pack_tag` to accomodate for glitch-soc's theming system). Ported upstream changes. - `app/views/admin/trends/links/preview_card_providers/index.html.haml`: Not really a conflict, upstream change textually too close to a glitch-soc change (removed `javascript_pack_tag` to accomodate for glitch-soc's theming system). Ported upstream changes. - `app/views/admin/trends/statuses/index.html.haml`: Not really a conflict, upstream change textually too close to a glitch-soc change (removed `javascript_pack_tag` to accomodate for glitch-soc's theming system). Ported upstream changes. - `app/views/admin/trends/tags/index.html.haml`: Not really a conflict, upstream change textually too close to a glitch-soc change (removed `javascript_pack_tag` to accomodate for glitch-soc's theming system). Ported upstream changes.
This commit is contained in:
commit
8743b1ea40
14 changed files with 100 additions and 31 deletions
|
@ -94,8 +94,9 @@ class Api::V1::StatusesController < Api::BaseController
|
|||
end
|
||||
|
||||
def set_thread
|
||||
@thread = status_params[:in_reply_to_id].blank? ? nil : Status.find(status_params[:in_reply_to_id])
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
@thread = Status.find(status_params[:in_reply_to_id]) if status_params[:in_reply_to_id].present?
|
||||
authorize(@thread, :show?) if @thread.present?
|
||||
rescue ActiveRecord::RecordNotFound, Mastodon::NotPermittedError
|
||||
render json: { error: I18n.t('statuses.errors.in_reply_not_found') }, status: 404
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue