Compare commits

...

2 Commits

Author SHA1 Message Date
Shadowfacts 819b84caf7 Don't send reg_id in APNS payload 2024-04-09 21:14:50 -04:00
Shadowfacts 496157e505 context -> ctx 2024-04-09 11:57:44 -04:00
2 changed files with 1 additions and 2 deletions

View File

@ -14,7 +14,6 @@ defmodule TuskerPush.Forwarder do
}, },
"mutable-content" => 1 "mutable-content" => 1
}, },
"reg_id" => registration.id,
"data" => Base.encode64(body), "data" => Base.encode64(body),
"salt" => salt, "salt" => salt,
"pk" => key, "pk" => key,

View File

@ -12,7 +12,7 @@ defmodule TuskerPushWeb.PushController do
{:body, {:ok, body, conn}} <- {:body, read_body(conn)}, {:body, {:ok, body, conn}} <- {:body, read_body(conn)},
{:salt, salt} when not is_nil(salt) <- get_salt(conn), {:salt, salt} when not is_nil(salt) <- get_salt(conn),
{:key, key} when not is_nil(key) <- get_key(conn), {:key, key} when not is_nil(key) <- get_key(conn),
context <- Map.get(params, "context"), context <- Map.get(params, "ctx"),
{:forward, :ok} <- {:forward, Forwarder.forward(registration, body, salt, key, context)} do {:forward, :ok} <- {:forward, Forwarder.forward(registration, body, salt, key, context)} do
send_resp(conn, 200, "ok") send_resp(conn, 200, "ok")
else else