fix and improve web push; add configuration docs
This commit is contained in:
parent
30dc81667c
commit
658edb166f
4 changed files with 32 additions and 19 deletions
|
|
@ -5,7 +5,12 @@ defmodule Pleroma.Web.MastodonAPI.PushSubscriptionView do
|
|||
%{
|
||||
id: to_string(subscription.id),
|
||||
endpoint: subscription.endpoint,
|
||||
alerts: Map.get(subscription.data, "alerts")
|
||||
alerts: Map.get(subscription.data, "alerts"),
|
||||
server_key: server_key()
|
||||
}
|
||||
end
|
||||
|
||||
defp server_key do
|
||||
Keyword.get(Application.get_env(:web_push_encryption, :vapid_details), :public_key)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue