1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.MastodonAPI.PushSubscriptionView do
8 def render("push_subscription.json", %{subscription: subscription}) do
10 id: to_string(subscription.id),
11 endpoint: subscription.endpoint,
12 alerts: Map.get(subscription.data, "alerts"),
13 server_key: server_key()
18 Keyword.get(Application.get_env(:web_push_encryption, :vapid_details), :public_key)