{"action":"opened","number":171,"pull_request":{"url":"https://api.github.com/repos/ably/ably-ios/pulls/171","id":57456227,"html_url":"https://github.com/ably/ably-ios/pull/171","diff_url":"https://github.com/ably/ably-ios/pull/171.diff","patch_url":"https://github.com/ably/ably-ios/pull/171.patch","issue_url":"https://api.github.com/repos/ably/ably-ios/issues/171","number":171,"state":"open","locked":false,"title":"Rename payload -> data, refactor message data encoding.","user":{"login":"tcard","id":727422,"avatar_url":"https://avatars.githubusercontent.com/u/727422?v=3","gravatar_id":"","url":"https://api.github.com/users/tcard","html_url":"https://github.com/tcard","followers_url":"https://api.github.com/users/tcard/followers","following_url":"https://api.github.com/users/tcard/following{/other_user}","gists_url":"https://api.github.com/users/tcard/gists{/gist_id}","starred_url":"https://api.github.com/users/tcard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcard/subscriptions","organizations_url":"https://api.github.com/users/tcard/orgs","repos_url":"https://api.github.com/users/tcard/repos","events_url":"https://api.github.com/users/tcard/events{/privacy}","received_events_url":"https://api.github.com/users/tcard/received_events","type":"User","site_admin":false},"body":"Well, this took a bit of time to get right. It started just\r\nwanting to comply with the spec, and access message data just by\r\ndoing `message.data` instead of `message.payload.payload`. So\r\nI wanted to remove just the amount of code necessary to do that,\r\nbut ended up opening a can of worms and didn't stop until it\r\nkind of made sense.\r\n\r\nIt seems like the whole ARTPayload business was designed with a\r\nuse case which didn't really fit the spec at all, so it was then\r\nhacked here and there to kind of work in some (not all) cases\r\nby bypassing the design. It was also really overengineered, with\r\na whole class hierarchy thingy just for a few predefined cases.\r\nI simplified the whole thing a lot and made it fit the spec.\r\n\r\nI could've just set up a custom `message.data` getter method that\r\nextracted the data from the ARTPayload instance to make it comply\r\nwith the spec, but well, this would've hit us down the road\r\nanyway.","created_at":"2016-01-28T05:05:36Z","updated_at":"2016-01-28T05:05:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ably/ably-ios/pulls/171/commits","review_comments_url":"https://api.github.com/repos/ably/ably-ios/pulls/171/comments","review_comment_url":"https://api.github.com/repos/ably/ably-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ably/ably-ios/issues/171/comments","statuses_url":"https://api.github.com/repos/ably/ably-ios/statuses/1dd96b6f5e9204ecfc46cd9a1923659fe997bb87","head":{"label":"ably:refactor-payload","ref":"refactor-payload","sha":"1dd96b6f5e9204ecfc46cd9a1923659fe997bb87","user":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"repo":{"id":27377471,"name":"ably-ios","full_name":"ably/ably-ios","owner":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ably/ably-ios","description":"iOS Objective-C client for Ably real-time messaging service","fork":false,"url":"https://api.github.com/repos/ably/ably-ios","forks_url":"https://api.github.com/repos/ably/ably-ios/forks","keys_url":"https://api.github.com/repos/ably/ably-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/ably-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/ably-ios/teams","hooks_url":"https://api.github.com/repos/ably/ably-ios/hooks","issue_events_url":"https://api.github.com/repos/ably/ably-ios/issues/events{/number}","events_url":"https://api.github.com/repos/ably/ably-ios/events","assignees_url":"https://api.github.com/repos/ably/ably-ios/assignees{/user}","branches_url":"https://api.github.com/repos/ably/ably-ios/branches{/branch}","tags_url":"https://api.github.com/repos/ably/ably-ios/tags","blobs_url":"https://api.github.com/repos/ably/ably-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/ably-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/ably-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/ably-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/ably-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/ably-ios/languages","stargazers_url":"https://api.github.com/repos/ably/ably-ios/stargazers","contributors_url":"https://api.github.com/repos/ably/ably-ios/contributors","subscribers_url":"https://api.github.com/repos/ably/ably-ios/subscribers","subscription_url":"https://api.github.com/repos/ably/ably-ios/subscription","commits_url":"https://api.github.com/repos/ably/ably-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/ably-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/ably-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/ably-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/ably-ios/contents/{+path}","compare_url":"https://api.github.com/repos/ably/ably-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/ably-ios/merges","archive_url":"https://api.github.com/repos/ably/ably-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/ably-ios/downloads","issues_url":"https://api.github.com/repos/ably/ably-ios/issues{/number}","pulls_url":"https://api.github.com/repos/ably/ably-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/ably-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/ably-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/ably-ios/labels{/name}","releases_url":"https://api.github.com/repos/ably/ably-ios/releases{/id}","deployments_url":"https://api.github.com/repos/ably/ably-ios/deployments","created_at":"2014-12-01T12:00:37Z","updated_at":"2016-01-12T18:38:23Z","pushed_at":"2016-01-28T05:05:28Z","git_url":"git://github.com/ably/ably-ios.git","ssh_url":"git@github.com:ably/ably-ios.git","clone_url":"https://github.com/ably/ably-ios.git","svn_url":"https://github.com/ably/ably-ios","homepage":null,"size":1654,"stargazers_count":1,"watchers_count":1,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":38,"forks":3,"open_issues":38,"watchers":1,"default_branch":"master"}},"base":{"label":"ably:master","ref":"master","sha":"98e5d416026e0fb5bad9d5b6e9d9c5115f255ede","user":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"repo":{"id":27377471,"name":"ably-ios","full_name":"ably/ably-ios","owner":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ably/ably-ios","description":"iOS Objective-C client for Ably real-time messaging service","fork":false,"url":"https://api.github.com/repos/ably/ably-ios","forks_url":"https://api.github.com/repos/ably/ably-ios/forks","keys_url":"https://api.github.com/repos/ably/ably-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/ably-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/ably-ios/teams","hooks_url":"https://api.github.com/repos/ably/ably-ios/hooks","issue_events_url":"https://api.github.com/repos/ably/ably-ios/issues/events{/number}","events_url":"https://api.github.com/repos/ably/ably-ios/events","assignees_url":"https://api.github.com/repos/ably/ably-ios/assignees{/user}","branches_url":"https://api.github.com/repos/ably/ably-ios/branches{/branch}","tags_url":"https://api.github.com/repos/ably/ably-ios/tags","blobs_url":"https://api.github.com/repos/ably/ably-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/ably-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/ably-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/ably-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/ably-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/ably-ios/languages","stargazers_url":"https://api.github.com/repos/ably/ably-ios/stargazers","contributors_url":"https://api.github.com/repos/ably/ably-ios/contributors","subscribers_url":"https://api.github.com/repos/ably/ably-ios/subscribers","subscription_url":"https://api.github.com/repos/ably/ably-ios/subscription","commits_url":"https://api.github.com/repos/ably/ably-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/ably-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/ably-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/ably-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/ably-ios/contents/{+path}","compare_url":"https://api.github.com/repos/ably/ably-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/ably-ios/merges","archive_url":"https://api.github.com/repos/ably/ably-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/ably-ios/downloads","issues_url":"https://api.github.com/repos/ably/ably-ios/issues{/number}","pulls_url":"https://api.github.com/repos/ably/ably-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/ably-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/ably-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/ably-ios/labels{/name}","releases_url":"https://api.github.com/repos/ably/ably-ios/releases{/id}","deployments_url":"https://api.github.com/repos/ably/ably-ios/deployments","created_at":"2014-12-01T12:00:37Z","updated_at":"2016-01-12T18:38:23Z","pushed_at":"2016-01-28T05:05:28Z","git_url":"git://github.com/ably/ably-ios.git","ssh_url":"git@github.com:ably/ably-ios.git","clone_url":"https://github.com/ably/ably-ios.git","svn_url":"https://github.com/ably/ably-ios","homepage":null,"size":1654,"stargazers_count":1,"watchers_count":1,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":38,"forks":3,"open_issues":38,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ably/ably-ios/pulls/171"},"html":{"href":"https://github.com/ably/ably-ios/pull/171"},"issue":{"href":"https://api.github.com/repos/ably/ably-ios/issues/171"},"comments":{"href":"https://api.github.com/repos/ably/ably-ios/issues/171/comments"},"review_comments":{"href":"https://api.github.com/repos/ably/ably-ios/pulls/171/comments"},"review_comment":{"href":"https://api.github.com/repos/ably/ably-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ably/ably-ios/pulls/171/commits"},"statuses":{"href":"https://api.github.com/repos/ably/ably-ios/statuses/1dd96b6f5e9204ecfc46cd9a1923659fe997bb87"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":373,"deletions":944,"changed_files":33}}