{"action":"opened","number":250,"pull_request":{"url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/pulls/250","id":100005188,"html_url":"https://github.com/layerhq/Atlas-Messenger-iOS/pull/250","diff_url":"https://github.com/layerhq/Atlas-Messenger-iOS/pull/250.diff","patch_url":"https://github.com/layerhq/Atlas-Messenger-iOS/pull/250.patch","issue_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/issues/250","number":250,"state":"open","locked":false,"title":"Fixed how ATLMConversationViewController uses ‘showViewController’","user":{"login":"jpmcglone","id":4998416,"avatar_url":"https://avatars.githubusercontent.com/u/4998416?v=3","gravatar_id":"","url":"https://api.github.com/users/jpmcglone","html_url":"https://github.com/jpmcglone","followers_url":"https://api.github.com/users/jpmcglone/followers","following_url":"https://api.github.com/users/jpmcglone/following{/other_user}","gists_url":"https://api.github.com/users/jpmcglone/gists{/gist_id}","starred_url":"https://api.github.com/users/jpmcglone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpmcglone/subscriptions","organizations_url":"https://api.github.com/users/jpmcglone/orgs","repos_url":"https://api.github.com/users/jpmcglone/repos","events_url":"https://api.github.com/users/jpmcglone/events{/privacy}","received_events_url":"https://api.github.com/users/jpmcglone/received_events","type":"User","site_admin":false},"body":"There was a mistake hiding another mistake.\r\n\r\n## Mistake 1: \r\n`if (viewController.navigationController == nil && ![viewController isKindOfClass:[UINavigationController class]]) {`\r\n\r\nshould have read \r\n\r\n`if (self.navigationController == nil && ![viewController isKindOfClass:[UINavigationController class]]) {`\r\n\r\n## Mistake 2:\r\nThis method does not work with super, since super calls another method which in turn calls this one. (Infinite loop!) So, handled 'show' logic completely manually.\r\n\r\n---\r\nWhat this changes:\r\n- When you use 'showViewController' in ATLMConversationViewController now, it will push the VC if there's a navigation controller, otherwise it will present it.\r\n---\r\n\r\nIt's a good wrapper for showViewController, but it might be the case that we want location and pictures, etc. to be presented, even though we're in a UINavigationViewController.\r\n\r\nIf this is the case, I can update the two lines to use 'presentViewController' directly instead of calling 'showViewController'","created_at":"2017-01-03T19:14:39Z","updated_at":"2017-01-03T19:14:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/pulls/250/commits","review_comments_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/pulls/250/comments","review_comment_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/issues/250/comments","statuses_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/statuses/70a43fb4a19977c7de34976f559b292fee9673dd","head":{"label":"layerhq:jpmcglone/showViewController-fix","ref":"jpmcglone/showViewController-fix","sha":"70a43fb4a19977c7de34976f559b292fee9673dd","user":{"login":"layerhq","id":5497685,"avatar_url":"https://avatars.githubusercontent.com/u/5497685?v=3","gravatar_id":"","url":"https://api.github.com/users/layerhq","html_url":"https://github.com/layerhq","followers_url":"https://api.github.com/users/layerhq/followers","following_url":"https://api.github.com/users/layerhq/following{/other_user}","gists_url":"https://api.github.com/users/layerhq/gists{/gist_id}","starred_url":"https://api.github.com/users/layerhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/layerhq/subscriptions","organizations_url":"https://api.github.com/users/layerhq/orgs","repos_url":"https://api.github.com/users/layerhq/repos","events_url":"https://api.github.com/users/layerhq/events{/privacy}","received_events_url":"https://api.github.com/users/layerhq/received_events","type":"Organization","site_admin":false},"repo":{"id":20731121,"name":"Atlas-Messenger-iOS","full_name":"layerhq/Atlas-Messenger-iOS","owner":{"login":"layerhq","id":5497685,"avatar_url":"https://avatars.githubusercontent.com/u/5497685?v=3","gravatar_id":"","url":"https://api.github.com/users/layerhq","html_url":"https://github.com/layerhq","followers_url":"https://api.github.com/users/layerhq/followers","following_url":"https://api.github.com/users/layerhq/following{/other_user}","gists_url":"https://api.github.com/users/layerhq/gists{/gist_id}","starred_url":"https://api.github.com/users/layerhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/layerhq/subscriptions","organizations_url":"https://api.github.com/users/layerhq/orgs","repos_url":"https://api.github.com/users/layerhq/repos","events_url":"https://api.github.com/users/layerhq/events{/privacy}","received_events_url":"https://api.github.com/users/layerhq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/layerhq/Atlas-Messenger-iOS","description":"Example messenger / chat app for iOS using Atlas and Layer","fork":false,"url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS","forks_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/forks","keys_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/teams","hooks_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/hooks","issue_events_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/events","assignees_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/tags","blobs_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/languages","stargazers_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/stargazers","contributors_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/contributors","subscribers_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/subscribers","subscription_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/subscription","commits_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/merges","archive_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/downloads","issues_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/labels{/name}","releases_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/deployments","created_at":"2014-06-11T15:47:48Z","updated_at":"2017-01-01T03:07:06Z","pushed_at":"2017-01-03T19:10:47Z","git_url":"git://github.com/layerhq/Atlas-Messenger-iOS.git","ssh_url":"git@github.com:layerhq/Atlas-Messenger-iOS.git","clone_url":"https://github.com/layerhq/Atlas-Messenger-iOS.git","svn_url":"https://github.com/layerhq/Atlas-Messenger-iOS","homepage":"https://layer.com/","size":48915,"stargazers_count":230,"watchers_count":230,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":8,"forks":55,"open_issues":8,"watchers":230,"default_branch":"master"}},"base":{"label":"layerhq:master","ref":"master","sha":"586cbad5df6db845f10237c121843db04e5b9bb0","user":{"login":"layerhq","id":5497685,"avatar_url":"https://avatars.githubusercontent.com/u/5497685?v=3","gravatar_id":"","url":"https://api.github.com/users/layerhq","html_url":"https://github.com/layerhq","followers_url":"https://api.github.com/users/layerhq/followers","following_url":"https://api.github.com/users/layerhq/following{/other_user}","gists_url":"https://api.github.com/users/layerhq/gists{/gist_id}","starred_url":"https://api.github.com/users/layerhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/layerhq/subscriptions","organizations_url":"https://api.github.com/users/layerhq/orgs","repos_url":"https://api.github.com/users/layerhq/repos","events_url":"https://api.github.com/users/layerhq/events{/privacy}","received_events_url":"https://api.github.com/users/layerhq/received_events","type":"Organization","site_admin":false},"repo":{"id":20731121,"name":"Atlas-Messenger-iOS","full_name":"layerhq/Atlas-Messenger-iOS","owner":{"login":"layerhq","id":5497685,"avatar_url":"https://avatars.githubusercontent.com/u/5497685?v=3","gravatar_id":"","url":"https://api.github.com/users/layerhq","html_url":"https://github.com/layerhq","followers_url":"https://api.github.com/users/layerhq/followers","following_url":"https://api.github.com/users/layerhq/following{/other_user}","gists_url":"https://api.github.com/users/layerhq/gists{/gist_id}","starred_url":"https://api.github.com/users/layerhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/layerhq/subscriptions","organizations_url":"https://api.github.com/users/layerhq/orgs","repos_url":"https://api.github.com/users/layerhq/repos","events_url":"https://api.github.com/users/layerhq/events{/privacy}","received_events_url":"https://api.github.com/users/layerhq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/layerhq/Atlas-Messenger-iOS","description":"Example messenger / chat app for iOS using Atlas and Layer","fork":false,"url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS","forks_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/forks","keys_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/teams","hooks_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/hooks","issue_events_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/events","assignees_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/tags","blobs_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/languages","stargazers_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/stargazers","contributors_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/contributors","subscribers_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/subscribers","subscription_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/subscription","commits_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/merges","archive_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/downloads","issues_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/labels{/name}","releases_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/deployments","created_at":"2014-06-11T15:47:48Z","updated_at":"2017-01-01T03:07:06Z","pushed_at":"2017-01-03T19:10:47Z","git_url":"git://github.com/layerhq/Atlas-Messenger-iOS.git","ssh_url":"git@github.com:layerhq/Atlas-Messenger-iOS.git","clone_url":"https://github.com/layerhq/Atlas-Messenger-iOS.git","svn_url":"https://github.com/layerhq/Atlas-Messenger-iOS","homepage":"https://layer.com/","size":48915,"stargazers_count":230,"watchers_count":230,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":8,"forks":55,"open_issues":8,"watchers":230,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/pulls/250"},"html":{"href":"https://github.com/layerhq/Atlas-Messenger-iOS/pull/250"},"issue":{"href":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/issues/250"},"comments":{"href":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/issues/250/comments"},"review_comments":{"href":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/pulls/250/comments"},"review_comment":{"href":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/pulls/250/commits"},"statuses":{"href":"https://api.github.com/repos/layerhq/Atlas-Messenger-iOS/statuses/70a43fb4a19977c7de34976f559b292fee9673dd"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":14,"deletions":7,"changed_files":1}}
{"actor":{"display_login":"jpmcglone"}}