chvanikoff / apns4ex

APNS for Elixir
MIT License
70 stars 23 forks source link

APNS.Callback's message_id not match APNS.Message's id #48

Open dcy opened 7 years ago

dcy commented 7 years ago

Hi!

    message = APNS.Message.new
    msg_id = :erlang.system_time(:milli_seconds)
    message = message
              |> Map.put(:id, msg_id)
              |> Map.put(:token, token)
              |> Map.put(:alert, content)
  def error(error = %APNS.Error{}, token) do
    # handle error
    Logger.error "Apns Callback error: #{inspect error}"
  end
[error] Apns Callback error: %APNS.Error{error: "Invalid token", message_id: 4058550999, status: 8}

Callback's message_id does not match APNS.Message's id

zepplock commented 7 years ago

I'm not sure what the problem here. What is actual APNS.Message in this case?