projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into feature/compat/push-subscriptions
[akkoma]
/
lib
/
pleroma
/
web
/
push
/
push.ex
diff --git
a/lib/pleroma/web/push/push.ex
b/lib/pleroma/web/push/push.ex
index d27750ab67b18dc5542da322550e5107dbe48b02..4ac3be8a3e2fe60e14d6fdc140d52d9477d36a82 100644
(file)
--- 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 ->
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"
)
"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, %{}}
_ ->
{:ok, %{}}
@@
-30,7
+30,9
@@
defmodule Pleroma.Web.Push do
end
def send(notification) 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(
end
def handle_cast(