diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-11-06 09:50:41 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-11-06 09:50:41 +0100 |
commit | 0ad919b19257b7d8eb447f7955030927d26cdbe6 (patch) | |
tree | d78bd5ba447da166bb7d97a3df3e6d97902a5cdb /app/controllers | |
parent | 2f8fb49d1314db931385089bc9004a48700161ad (diff) | |
parent | 5187e4e758b0636432d984d1a95a310cac536205 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/javascript/mastodon/features/compose/components/poll_form.js`: glitch-soc change because of having changed the default number of available poll options. Applied upstream's changes while keeping glitch-soc's default number of poll options. - `public/oops.png`: We had a minor graphics change, probably not worth diverging from upstream. Took upstream version.
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/confirmations_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/api/base_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/api/v1/statuses_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/api/v2/media_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/settings/featured_tags_controller.rb | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/admin/confirmations_controller.rb b/app/controllers/admin/confirmations_controller.rb index efe7dcbd4..6f4e42679 100644 --- a/app/controllers/admin/confirmations_controller.rb +++ b/app/controllers/admin/confirmations_controller.rb @@ -17,7 +17,7 @@ module Admin @user.resend_confirmation_instructions - log_action :confirm, @user + log_action :resend, @user flash[:notice] = I18n.t('admin.accounts.resend_confirmation.success') redirect_to admin_accounts_path diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb index c46fde65b..3f3e1ca7b 100644 --- a/app/controllers/api/base_controller.rb +++ b/app/controllers/api/base_controller.rb @@ -133,7 +133,7 @@ class Api::BaseController < ApplicationController end def disallow_unauthenticated_api_access? - authorized_fetch_mode? + ENV['DISALLOW_UNAUTHENTICATED_API_ACCESS'] == 'true' || Rails.configuration.x.whitelist_mode end private diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index f8069b720..26ef7087a 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -79,7 +79,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 diff --git a/app/controllers/api/v2/media_controller.rb b/app/controllers/api/v2/media_controller.rb index 0c1baf01d..288f847f1 100644 --- a/app/controllers/api/v2/media_controller.rb +++ b/app/controllers/api/v2/media_controller.rb @@ -3,7 +3,7 @@ class Api::V2::MediaController < Api::V1::MediaController def create @media_attachment = current_account.media_attachments.create!({ delay_processing: true }.merge(media_attachment_params)) - render json: @media_attachment, serializer: REST::MediaAttachmentSerializer, status: 202 + render json: @media_attachment, serializer: REST::MediaAttachmentSerializer, status: @media_attachment.not_processed? ? 202 : 200 rescue Paperclip::Errors::NotIdentifiedByImageMagickError render json: file_type_error, status: 422 rescue Paperclip::Error diff --git a/app/controllers/settings/featured_tags_controller.rb b/app/controllers/settings/featured_tags_controller.rb index b3db04a42..c38440265 100644 --- a/app/controllers/settings/featured_tags_controller.rb +++ b/app/controllers/settings/featured_tags_controller.rb @@ -23,7 +23,7 @@ class Settings::FeaturedTagsController < Settings::BaseController end def destroy - RemoveFeaturedTagWorker.perform_async(current_account.id, @featured_tag.id) + RemoveFeaturedTagService.new.call(current_account, @featured_tag) redirect_to settings_featured_tags_path end |