Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `.github/workflows/build-image.yml`: Upstream changed how docker images were built, including how they were cached. I don't know much about it, so applied upstream's changes. - `app/controllers/admin/domain_blocks_controller.rb`: The feature, that was in glitch-soc, got backported upstream. It also had a few fixes upstream, so those have been ported! - `app/javascript/packs/admin.js`: Glitch-soc changes have been backported upstream. As a result, some code from `app/javascript/core/admin.js` got added upstream. Kept our version since our shared Javascript already has that feature. - `app/models/user.rb`: Upstream added something to distinguish unusable and unusable-because-moved accounts, while glitch-soc considers moved accounts usable. Took upstream's code for `functional_or_moved?` and made `functional?` call it. - `app/views/statuses/_simple_status.html.haml`: Upstream cleaned up code style a bit, on a line that we had custom changes for. Applied upstream's change while keeping our change. - `config/initializers/content_security_policy.rb`: Upstream adopted one CSP directive we already had. The conflict is because of our files being structurally different, but the change itself was already part of glitch-soc. Kept our version.
This commit is contained in:
@ -17,6 +17,8 @@ class AccountsController < ApplicationController
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
expires_in 0, public: true unless user_signed_in?
|
||||
|
||||
@rss_url = rss_url
|
||||
end
|
||||
|
||||
format.rss do
|
||||
|
@ -9,9 +9,9 @@ module Admin
|
||||
@form = Form::DomainBlockBatch.new(form_domain_block_batch_params.merge(current_account: current_account, action: action_from_button))
|
||||
@form.save
|
||||
rescue ActionController::ParameterMissing
|
||||
flash[:alert] = I18n.t('admin.email_domain_blocks.no_domain_block_selected')
|
||||
flash[:alert] = I18n.t('admin.domain_blocks.no_domain_block_selected')
|
||||
rescue Mastodon::NotPermittedError
|
||||
flash[:alert] = I18n.t('admin.domain_blocks.created_msg')
|
||||
flash[:alert] = I18n.t('admin.domain_blocks.not_permitted')
|
||||
else
|
||||
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
|
||||
end
|
||||
|
@ -19,7 +19,7 @@ module Admin
|
||||
rescue ActionController::ParameterMissing
|
||||
flash[:alert] = I18n.t('admin.email_domain_blocks.no_email_domain_block_selected')
|
||||
rescue Mastodon::NotPermittedError
|
||||
flash[:alert] = I18n.t('admin.custom_emojis.not_permitted')
|
||||
flash[:alert] = I18n.t('admin.email_domain_blocks.not_permitted')
|
||||
ensure
|
||||
redirect_to admin_email_domain_blocks_path
|
||||
end
|
||||
|
@ -3,11 +3,11 @@
|
||||
class Api::V1::FollowedTagsController < Api::BaseController
|
||||
TAGS_LIMIT = 100
|
||||
|
||||
before_action -> { doorkeeper_authorize! :follow, :read, :'read:follows' }, except: :show
|
||||
before_action -> { doorkeeper_authorize! :follow, :read, :'read:follows' }
|
||||
before_action :require_user!
|
||||
before_action :set_results
|
||||
|
||||
after_action :insert_pagination_headers, only: :show
|
||||
after_action :insert_pagination_headers
|
||||
|
||||
def index
|
||||
render json: @results.map(&:tag), each_serializer: REST::TagSerializer, relationships: TagRelationshipsPresenter.new(@results.map(&:tag), current_user&.account_id)
|
||||
@ -43,7 +43,7 @@ class Api::V1::FollowedTagsController < Api::BaseController
|
||||
end
|
||||
|
||||
def records_continue?
|
||||
@results.size == limit_param(TAG_LIMIT)
|
||||
@results.size == limit_param(TAGS_LIMIT)
|
||||
end
|
||||
|
||||
def pagination_params(core_params)
|
||||
|
@ -12,7 +12,7 @@ class Api::V1::TagsController < Api::BaseController
|
||||
end
|
||||
|
||||
def follow
|
||||
TagFollow.create!(tag: @tag, account: current_account, rate_limit: true)
|
||||
TagFollow.first_or_create!(tag: @tag, account: current_account, rate_limit: true)
|
||||
render json: @tag, serializer: REST::TagSerializer
|
||||
end
|
||||
|
||||
|
@ -20,6 +20,10 @@ class StatusesCleanupController < ApplicationController
|
||||
# Do nothing
|
||||
end
|
||||
|
||||
def require_functional!
|
||||
redirect_to edit_user_registration_path unless current_user.functional_or_moved?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_pack
|
||||
|
Reference in New Issue
Block a user