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.Push do
7 alias Pleroma.Workers.WebPusher
11 defdelegate worker_args(queue), to: Pleroma.Workers.Helper
16 VAPID key pair is not found. If you wish to enabled web push, please run
18 mix web_push.gen.keypair
20 and add the resulting output to your configuration file.
26 Application.get_env(:web_push_encryption, :vapid_details, [])
30 case vapid_config() do
32 list when is_list(list) -> true
37 def send(notification) do
38 %{"op" => "web_push", "notification_id" => notification.id}
39 |> WebPusher.new(worker_args(:web_push))