From ce72aeadc0ef8d2cb2f569d73620d788327266ce Mon Sep 17 00:00:00 2001 From: Henry Popp Date: Mon, 25 May 2020 10:05:24 -0500 Subject: [PATCH] fix: proper APNS notification payload spec --- lib/pigeon/apns/notification.ex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/pigeon/apns/notification.ex b/lib/pigeon/apns/notification.ex index a2bd2365..fbcc8342 100644 --- a/lib/pigeon/apns/notification.ex +++ b/lib/pigeon/apns/notification.ex @@ -39,7 +39,7 @@ defmodule Pigeon.APNS.Notification do priority: non_neg_integer | nil, push_type: String.t() | nil, id: String.t() | nil, - payload: %{String.t() => %{String.t() => term}}, + payload: %{String.t() => term}, response: response, topic: String.t() | nil } @@ -47,11 +47,11 @@ defmodule Pigeon.APNS.Notification do @typedoc ~S""" APNS push response - - nil - Push has not been sent yet - - `:success` - Push was successfully sent + - nil - Push has not been sent yet. + - `:success` - Push was successfully sent. - `t:Pigeon.APNS.Error.error_response/0` - Push attempted but - server responded with error - - `:timeout` - Internal error. Push did not reach APNS servers + server responded with error. + - `:timeout` - Internal error. Push did not reach APNS servers. """ @type response :: nil | :success | Error.error_response() | :timeout @@ -279,7 +279,7 @@ defmodule Pigeon.APNS.Notification do topic: nil } """ - @spec put_custom(t, %{String.t() => String.t()}) :: t + @spec put_custom(t, %{String.t() => term}) :: t def put_custom(notification, data) do new_payload = Map.merge(notification.payload, data) %{notification | payload: new_payload}