diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2018-12-06 19:56:56 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2018-12-06 19:56:56 +0700 |
commit | bac58b152495c3ebf72e3ad1c3102de075fcc366 (patch) | |
tree | db90cf7a14f330ea509ce0a60b2cab2273b27566 | |
parent | 8b4397c704147bcc5ca12ab60dde32f2b6e11a41 (diff) | |
download | pleroma-bac58b152495c3ebf72e3ad1c3102de075fcc366.tar.gz |
show warning if VAPID is not set
-rw-r--r-- | lib/pleroma/web/push/push.ex | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pleroma/web/push/push.ex b/lib/pleroma/web/push/push.ex index d27750ab6..4ac3be8a3 100644 --- a/lib/pleroma/web/push/push.ex +++ b/lib/pleroma/web/push/push.ex @@ -18,11 +18,11 @@ defmodule Pleroma.Web.Push do def init(:ok) do case Application.get_env(:web_push_encryption, :vapid_details) do nil -> - Logger.error( + Logger.warn( "VAPID key pair is not found. Please, add VAPID configuration to config. Run `mix web_push.gen.keypair` mix task to create a key pair" ) - {:error, %{}} + :ignore _ -> {:ok, %{}} @@ -30,7 +30,9 @@ defmodule Pleroma.Web.Push do end def send(notification) do - GenServer.cast(Pleroma.Web.Push, {:send, notification}) + if Application.get_env(:web_push_encryption, :vapid_details) do + GenServer.cast(Pleroma.Web.Push, {:send, notification}) + end end def handle_cast( |