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
6 alias Pleroma.Workers.WebPusherWorker
13 VAPID key pair is not found. If you wish to enabled web push, please run
15 mix web_push.gen.keypair
17 and add the resulting output to your configuration file.
23 Application.get_env(:web_push_encryption, :vapid_details, [])
27 case vapid_config() do
29 list when is_list(list) -> true
34 def send(notification) do
35 WebPusherWorker.enqueue("web_push", %{"notification_id" => notification.id})