{"action":"created","issue":{"url":"https://api.github.com/repos/relayrides/pushy/issues/390","repository_url":"https://api.github.com/repos/relayrides/pushy","labels_url":"https://api.github.com/repos/relayrides/pushy/issues/390/labels{/name}","comments_url":"https://api.github.com/repos/relayrides/pushy/issues/390/comments","events_url":"https://api.github.com/repos/relayrides/pushy/issues/390/events","html_url":"https://github.com/relayrides/pushy/issues/390","id":194549611,"number":390,"title":"Auto-collapsing alert dictionary into string","user":{"login":"yoorick","id":1833705,"avatar_url":"https://avatars.githubusercontent.com/u/1833705?v=3","gravatar_id":"","url":"https://api.github.com/users/yoorick","html_url":"https://github.com/yoorick","followers_url":"https://api.github.com/users/yoorick/followers","following_url":"https://api.github.com/users/yoorick/following{/other_user}","gists_url":"https://api.github.com/users/yoorick/gists{/gist_id}","starred_url":"https://api.github.com/users/yoorick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoorick/subscriptions","organizations_url":"https://api.github.com/users/yoorick/orgs","repos_url":"https://api.github.com/users/yoorick/repos","events_url":"https://api.github.com/users/yoorick/events{/privacy}","received_events_url":"https://api.github.com/users/yoorick/received_events","type":"User","site_admin":false},"labels":[{"id":50481632,"url":"https://api.github.com/repos/relayrides/pushy/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/relayrides/pushy/milestones/20","html_url":"https://github.com/relayrides/pushy/milestone/20","labels_url":"https://api.github.com/repos/relayrides/pushy/milestones/20/labels","id":2100090,"number":20,"title":"v0.8.2","description":"","creator":{"login":"jchambers","id":31352,"avatar_url":"https://avatars.githubusercontent.com/u/31352?v=3","gravatar_id":"","url":"https://api.github.com/users/jchambers","html_url":"https://github.com/jchambers","followers_url":"https://api.github.com/users/jchambers/followers","following_url":"https://api.github.com/users/jchambers/following{/other_user}","gists_url":"https://api.github.com/users/jchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/jchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jchambers/subscriptions","organizations_url":"https://api.github.com/users/jchambers/orgs","repos_url":"https://api.github.com/users/jchambers/repos","events_url":"https://api.github.com/users/jchambers/events{/privacy}","received_events_url":"https://api.github.com/users/jchambers/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":1,"state":"open","created_at":"2016-10-28T16:25:10Z","updated_at":"2016-12-09T15:01:23Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-12-09T09:29:10Z","updated_at":"2016-12-09T15:01:25Z","closed_at":null,"body":"Long ago there was an advice in Apple's documentation:\r\n> Don't specify a dictionary as the value of alert if the dictionary only has the body property\r\n\r\nAnd Pushy's ApnsPayloadBuilder does exactly that -- it collapses `alert:{body:\"text\"}` into `alert:\"text\"`.\r\nBut now [the page containing the advice](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH107-SW10) is no longer available and [new version of documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html#//apple_ref/doc/uid/TP40008194-CH17-SW2) says the opposite:\r\n> The **preferred value** for this key is a **dictionary**, the keys for which are listed in Table 9-2.\r\n\r\nSo I would like to have some kind of \"switch\" to enable/disable auto-collapsing of the `alert` dictionary into a string."},"comment":{"url":"https://api.github.com/repos/relayrides/pushy/issues/comments/266034065","html_url":"https://github.com/relayrides/pushy/issues/390#issuecomment-266034065","issue_url":"https://api.github.com/repos/relayrides/pushy/issues/390","id":266034065,"user":{"login":"jchambers","id":31352,"avatar_url":"https://avatars.githubusercontent.com/u/31352?v=3","gravatar_id":"","url":"https://api.github.com/users/jchambers","html_url":"https://github.com/jchambers","followers_url":"https://api.github.com/users/jchambers/followers","following_url":"https://api.github.com/users/jchambers/following{/other_user}","gists_url":"https://api.github.com/users/jchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/jchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jchambers/subscriptions","organizations_url":"https://api.github.com/users/jchambers/orgs","repos_url":"https://api.github.com/users/jchambers/repos","events_url":"https://api.github.com/users/jchambers/events{/privacy}","received_events_url":"https://api.github.com/users/jchambers/received_events","type":"User","site_admin":false},"created_at":"2016-12-09T15:01:25Z","updated_at":"2016-12-09T15:01:25Z","body":"> the new version of documentation says the opposite\r\n\r\nGood catch. I hadn't noticed that.\r\n\r\n> So I would like to have some kind of \"switch\" to enable/disable auto-collapsing of the alert dictionary into a string.\r\n\r\nWhy a switch? Why not just always use a dictionary?"}}
{"actor":{"display_login":"jchambers"}}