{"action":"created","issue":{"url":"https://api.github.com/repos/google/go-gcm/issues/27","repository_url":"https://api.github.com/repos/google/go-gcm","labels_url":"https://api.github.com/repos/google/go-gcm/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/google/go-gcm/issues/27/comments","events_url":"https://api.github.com/repos/google/go-gcm/issues/27/events","html_url":"https://github.com/google/go-gcm/issues/27","id":150313646,"number":27,"title":"Potential problem with TimeToLive field in HttpMessage and XmppMessage","user":{"login":"karapas","id":3974496,"avatar_url":"https://avatars.githubusercontent.com/u/3974496?v=3","gravatar_id":"","url":"https://api.github.com/users/karapas","html_url":"https://github.com/karapas","followers_url":"https://api.github.com/users/karapas/followers","following_url":"https://api.github.com/users/karapas/following{/other_user}","gists_url":"https://api.github.com/users/karapas/gists{/gist_id}","starred_url":"https://api.github.com/users/karapas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karapas/subscriptions","organizations_url":"https://api.github.com/users/karapas/orgs","repos_url":"https://api.github.com/users/karapas/repos","events_url":"https://api.github.com/users/karapas/events{/privacy}","received_events_url":"https://api.github.com/users/karapas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-22T09:03:25Z","updated_at":"2016-05-31T17:53:05Z","closed_at":"2016-05-31T16:58:04Z","body":"Hi folks,\r\nI noticed that the TimeToLive field in the message structs is tagged as `json:\"time_to_live,omitempty\". From what I understand, this means that if TimeToLive has the default value (zero), then it will be omitted when marshaling the struct. If this is indeed the case (and according to my tests it is), then there is a discrepancy in the time_to_live usage, according to [https://developers.google.com/cloud-messaging/http-server-ref]:\r\ntime_to_live = 0, means that the notification should not be throttled and delivered immediately, and if this is not possible, then it should be discarded. However if I set TimeToLive = 0, it will be omitted from the message sent to the GCM server, and then the server will assume the default value, which is 4 weeks -- clearly, not what my intention was."},"comment":{"url":"https://api.github.com/repos/google/go-gcm/issues/comments/222767299","html_url":"https://github.com/google/go-gcm/issues/27#issuecomment-222767299","issue_url":"https://api.github.com/repos/google/go-gcm/issues/27","id":222767299,"user":{"login":"karapas","id":3974496,"avatar_url":"https://avatars.githubusercontent.com/u/3974496?v=3","gravatar_id":"","url":"https://api.github.com/users/karapas","html_url":"https://github.com/karapas","followers_url":"https://api.github.com/users/karapas/followers","following_url":"https://api.github.com/users/karapas/following{/other_user}","gists_url":"https://api.github.com/users/karapas/gists{/gist_id}","starred_url":"https://api.github.com/users/karapas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karapas/subscriptions","organizations_url":"https://api.github.com/users/karapas/orgs","repos_url":"https://api.github.com/users/karapas/repos","events_url":"https://api.github.com/users/karapas/events{/privacy}","received_events_url":"https://api.github.com/users/karapas/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T17:53:05Z","updated_at":"2016-05-31T17:53:05Z","body":"Great thanks!"}}
{"actor":{"display_login":"karapas"}}