mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 00:38:27 +00:00
Merge commit '77cd16f4ee7ab807df6fffb1538a6659a8182a9e' into glitch-soc/merge-upstream
Conflicts: - `app/javascript/styles/mastodon/components.scss`: Conflict caused by glitch-soc changing the path to images, and upstream removing styling using such an image. Removed the styling as upstream did. - `app/models/account.rb`: Conflict due to upstream changing lines adjacent to a change made in glitch-soc to have configurable limits. Ported upstream's changes. - `yarn.lock`: Dependencies adjacent to glitch-soc-only dependencies updated. Updated them as well.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::Web::PushSubscriptionsController < Api::Web::BaseController
|
||||
before_action :require_user!
|
||||
before_action :require_user!, except: :destroy
|
||||
before_action :set_push_subscription, only: :update
|
||||
before_action :destroy_previous_subscriptions, only: :create, if: :prior_subscriptions?
|
||||
after_action :update_session_with_subscription, only: :create
|
||||
@@ -17,6 +17,13 @@ class Api::Web::PushSubscriptionsController < Api::Web::BaseController
|
||||
render json: @push_subscription, serializer: REST::WebPushSubscriptionSerializer
|
||||
end
|
||||
|
||||
def destroy
|
||||
push_subscription = ::Web::PushSubscription.find_by_token_for(:unsubscribe, params[:id])
|
||||
push_subscription&.destroy
|
||||
|
||||
head 200
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def active_session
|
||||
|
||||
Reference in New Issue
Block a user