Merge commit 'cbe135210305c0ce4455130c4e75680e53ff1425' into glitch-soc/merge-upstream

Conflicts:
- `app/views/wrapstodon/show.html.haml`:
  Conflict caused by glitch-soc's theming system.
  Updated upstream changes.
This commit is contained in:
Claire committed 2025-12-15 20:22:20 +01:00
commit 1fdb48c668
65 files changed
+958 -344

No files matched your search

@@ -41,8 +41,8 @@ class Api::V1::Statuses::QuotesController < Api::V1::Statuses::BaseController
if current_account&.id != @status.account_id
domains = @statuses.filter_map(&:account_domain).uniq
account_ids = @statuses.map(&:account_id).uniq
relations = current_account&.relations_map(account_ids, domains) || {}
@statuses.reject! { |status| StatusFilter.new(status, current_account, relations).filtered? }
current_account&.preload_relations!(account_ids, domains)
@statuses.reject! { |status| StatusFilter.new(status, current_account).filtered? }
end
end
@@ -11,6 +11,7 @@ class Api::V1Alpha::CollectionItemsController < Api::BaseController
before_action :set_collection
before_action :set_account, only: [:create]
before_action :set_collection_item, only: [:destroy]
after_action :verify_authorized
@@ -23,6 +24,14 @@ class Api::V1Alpha::CollectionItemsController < Api::BaseController
render json: @item, serializer: REST::CollectionItemSerializer
end
def destroy
authorize @collection, :update?
@collection_item.destroy
head 200
end
private
def set_collection
@@ -35,6 +44,10 @@ class Api::V1Alpha::CollectionItemsController < Api::BaseController
@account = Account.find(params[:account_id])
end
def set_collection_item
@collection_item = @collection.collection_items.find(params[:id])
end
def check_feature_enabled
raise ActionController::RoutingError unless Mastodon::Feature.collections_enabled?
end