Skip to content

Commit

Permalink
fix: proper APNS notification payload spec
Browse files Browse the repository at this point in the history
  • Loading branch information
hpopp committed May 25, 2020
1 parent 678d1c1 commit ce72aea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/pigeon/apns/notification.ex
Expand Up @@ -39,19 +39,19 @@ 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
}

@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

Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit ce72aea

Please sign in to comment.