1 defmodule Pleroma.Web.MastodonAPI.PushSubscriptionView do
4 def render("push_subscription.json", %{subscription: subscription}) do
6 id: to_string(subscription.id),
7 endpoint: subscription.endpoint,
8 alerts: Map.get(subscription.data, "alerts"),
9 server_key: server_key()
14 Keyword.get(Application.get_env(:web_push_encryption, :vapid_details), :public_key)