{"action":"created","comment":{"url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/comments/65792393","id":65792393,"diff_hunk":"@@ -61,16 +61,10 @@ - (void)dealloc\n         //退出聊天室，删除会话\n         //leave the chatrrom,delete the conversation\n         NSString *chatter = [self.conversation.conversationId copy];\n-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\n-            EMError *error = nil;\n-            [[EMClient sharedClient].roomManager leaveChatroom:chatter error:&error];\n-            if (error !=nil) {\n-                dispatch_async(dispatch_get_main_queue(), ^{\n-                    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@\"Error\" message:[NSString stringWithFormat:@\"Leave chatroom '%@' failed [%@]\", chatter, error.errorDescription] delegate:nil cancelButtonTitle:@\"确定\" otherButtonTitles:nil, nil];\n-                    [alertView show];\n-                });\n-            }\n-        });\n+        [[EMClient sharedClient].roomManager asyncLeaveChatroom:chatter success:nil failure:^(EMError *aError) {","path":"ChatDemo-UI3.0/Class/Chat/ChatView/ChatViewController.m","position":14,"original_position":14,"commit_id":"c4bf1730ba028246285dbb33cb80f1a8d005f451","original_commit_id":"c4bf1730ba028246285dbb33cb80f1a8d005f451","user":{"login":"Neil-Cao","id":9793953,"avatar_url":"https://avatars.githubusercontent.com/u/9793953?v=3","gravatar_id":"","url":"https://api.github.com/users/Neil-Cao","html_url":"https://github.com/Neil-Cao","followers_url":"https://api.github.com/users/Neil-Cao/followers","following_url":"https://api.github.com/users/Neil-Cao/following{/other_user}","gists_url":"https://api.github.com/users/Neil-Cao/gists{/gist_id}","starred_url":"https://api.github.com/users/Neil-Cao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neil-Cao/subscriptions","organizations_url":"https://api.github.com/users/Neil-Cao/orgs","repos_url":"https://api.github.com/users/Neil-Cao/repos","events_url":"https://api.github.com/users/Neil-Cao/events{/privacy}","received_events_url":"https://api.github.com/users/Neil-Cao/received_events","type":"User","site_admin":false},"body":"如果是同步接口才需要这样做，就跟原来的代码一样，现在是异步接口，而且回调已经是在主线程了，就没有必要了","created_at":"2016-06-04T00:13:36Z","updated_at":"2016-06-04T00:13:36Z","html_url":"https://github.com/HyphenateInc/IMDemo_ios/pull/2#discussion_r65792393","pull_request_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/comments/65792393"},"html":{"href":"https://github.com/HyphenateInc/IMDemo_ios/pull/2#discussion_r65792393"},"pull_request":{"href":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/2","id":72490182,"html_url":"https://github.com/HyphenateInc/IMDemo_ios/pull/2","diff_url":"https://github.com/HyphenateInc/IMDemo_ios/pull/2.diff","patch_url":"https://github.com/HyphenateInc/IMDemo_ios/pull/2.patch","issue_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/issues/2","number":2,"state":"open","locked":false,"title":"update:change sync method to async","user":{"login":"lizilong1989","id":11918709,"avatar_url":"https://avatars.githubusercontent.com/u/11918709?v=3","gravatar_id":"","url":"https://api.github.com/users/lizilong1989","html_url":"https://github.com/lizilong1989","followers_url":"https://api.github.com/users/lizilong1989/followers","following_url":"https://api.github.com/users/lizilong1989/following{/other_user}","gists_url":"https://api.github.com/users/lizilong1989/gists{/gist_id}","starred_url":"https://api.github.com/users/lizilong1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizilong1989/subscriptions","organizations_url":"https://api.github.com/users/lizilong1989/orgs","repos_url":"https://api.github.com/users/lizilong1989/repos","events_url":"https://api.github.com/users/lizilong1989/events{/privacy}","received_events_url":"https://api.github.com/users/lizilong1989/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-03T11:06:11Z","updated_at":"2016-06-04T00:13:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d8b54b8370e3e16332ac4947e0b060a526d3a2a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/2/commits","review_comments_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/2/comments","review_comment_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/issues/2/comments","statuses_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/statuses/c4bf1730ba028246285dbb33cb80f1a8d005f451","head":{"label":"lizilong1989:master","ref":"master","sha":"c4bf1730ba028246285dbb33cb80f1a8d005f451","user":{"login":"lizilong1989","id":11918709,"avatar_url":"https://avatars.githubusercontent.com/u/11918709?v=3","gravatar_id":"","url":"https://api.github.com/users/lizilong1989","html_url":"https://github.com/lizilong1989","followers_url":"https://api.github.com/users/lizilong1989/followers","following_url":"https://api.github.com/users/lizilong1989/following{/other_user}","gists_url":"https://api.github.com/users/lizilong1989/gists{/gist_id}","starred_url":"https://api.github.com/users/lizilong1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizilong1989/subscriptions","organizations_url":"https://api.github.com/users/lizilong1989/orgs","repos_url":"https://api.github.com/users/lizilong1989/repos","events_url":"https://api.github.com/users/lizilong1989/events{/privacy}","received_events_url":"https://api.github.com/users/lizilong1989/received_events","type":"User","site_admin":false},"repo":{"id":57110022,"name":"IMDemo_ios","full_name":"lizilong1989/IMDemo_ios","owner":{"login":"lizilong1989","id":11918709,"avatar_url":"https://avatars.githubusercontent.com/u/11918709?v=3","gravatar_id":"","url":"https://api.github.com/users/lizilong1989","html_url":"https://github.com/lizilong1989","followers_url":"https://api.github.com/users/lizilong1989/followers","following_url":"https://api.github.com/users/lizilong1989/following{/other_user}","gists_url":"https://api.github.com/users/lizilong1989/gists{/gist_id}","starred_url":"https://api.github.com/users/lizilong1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizilong1989/subscriptions","organizations_url":"https://api.github.com/users/lizilong1989/orgs","repos_url":"https://api.github.com/users/lizilong1989/repos","events_url":"https://api.github.com/users/lizilong1989/events{/privacy}","received_events_url":"https://api.github.com/users/lizilong1989/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lizilong1989/IMDemo_ios","description":"","fork":true,"url":"https://api.github.com/repos/lizilong1989/IMDemo_ios","forks_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/forks","keys_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/teams","hooks_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/hooks","issue_events_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/issues/events{/number}","events_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/events","assignees_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/assignees{/user}","branches_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/branches{/branch}","tags_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/tags","blobs_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/statuses/{sha}","languages_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/languages","stargazers_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/stargazers","contributors_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/contributors","subscribers_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/subscribers","subscription_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/subscription","commits_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/contents/{+path}","compare_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/merges","archive_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/downloads","issues_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/issues{/number}","pulls_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/pulls{/number}","milestones_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/milestones{/number}","notifications_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/labels{/name}","releases_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/releases{/id}","deployments_url":"https://api.github.com/repos/lizilong1989/IMDemo_ios/deployments","created_at":"2016-04-26T08:09:30Z","updated_at":"2016-04-26T09:04:03Z","pushed_at":"2016-06-03T11:04:23Z","git_url":"git://github.com/lizilong1989/IMDemo_ios.git","ssh_url":"git@github.com:lizilong1989/IMDemo_ios.git","clone_url":"https://github.com/lizilong1989/IMDemo_ios.git","svn_url":"https://github.com/lizilong1989/IMDemo_ios","homepage":null,"size":15771,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HyphenateInc:master","ref":"master","sha":"4b359f348245c8f41b2ea9d4e8475b276e4b37b3","user":{"login":"HyphenateInc","id":18541999,"avatar_url":"https://avatars.githubusercontent.com/u/18541999?v=3","gravatar_id":"","url":"https://api.github.com/users/HyphenateInc","html_url":"https://github.com/HyphenateInc","followers_url":"https://api.github.com/users/HyphenateInc/followers","following_url":"https://api.github.com/users/HyphenateInc/following{/other_user}","gists_url":"https://api.github.com/users/HyphenateInc/gists{/gist_id}","starred_url":"https://api.github.com/users/HyphenateInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyphenateInc/subscriptions","organizations_url":"https://api.github.com/users/HyphenateInc/orgs","repos_url":"https://api.github.com/users/HyphenateInc/repos","events_url":"https://api.github.com/users/HyphenateInc/events{/privacy}","received_events_url":"https://api.github.com/users/HyphenateInc/received_events","type":"Organization","site_admin":false},"repo":{"id":57020577,"name":"IMDemo_ios","full_name":"HyphenateInc/IMDemo_ios","owner":{"login":"HyphenateInc","id":18541999,"avatar_url":"https://avatars.githubusercontent.com/u/18541999?v=3","gravatar_id":"","url":"https://api.github.com/users/HyphenateInc","html_url":"https://github.com/HyphenateInc","followers_url":"https://api.github.com/users/HyphenateInc/followers","following_url":"https://api.github.com/users/HyphenateInc/following{/other_user}","gists_url":"https://api.github.com/users/HyphenateInc/gists{/gist_id}","starred_url":"https://api.github.com/users/HyphenateInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyphenateInc/subscriptions","organizations_url":"https://api.github.com/users/HyphenateInc/orgs","repos_url":"https://api.github.com/users/HyphenateInc/repos","events_url":"https://api.github.com/users/HyphenateInc/events{/privacy}","received_events_url":"https://api.github.com/users/HyphenateInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HyphenateInc/IMDemo_ios","description":"","fork":false,"url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios","forks_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/forks","keys_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/teams","hooks_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/hooks","issue_events_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/issues/events{/number}","events_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/events","assignees_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/assignees{/user}","branches_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/branches{/branch}","tags_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/tags","blobs_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/statuses/{sha}","languages_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/languages","stargazers_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/stargazers","contributors_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/contributors","subscribers_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/subscribers","subscription_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/subscription","commits_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/contents/{+path}","compare_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/merges","archive_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/downloads","issues_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/issues{/number}","pulls_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls{/number}","milestones_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/milestones{/number}","notifications_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/labels{/name}","releases_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/releases{/id}","deployments_url":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/deployments","created_at":"2016-04-25T07:25:40Z","updated_at":"2016-04-27T13:13:31Z","pushed_at":"2016-06-03T11:06:11Z","git_url":"git://github.com/HyphenateInc/IMDemo_ios.git","ssh_url":"git@github.com:HyphenateInc/IMDemo_ios.git","clone_url":"https://github.com/HyphenateInc/IMDemo_ios.git","svn_url":"https://github.com/HyphenateInc/IMDemo_ios","homepage":null,"size":15632,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/2"},"html":{"href":"https://github.com/HyphenateInc/IMDemo_ios/pull/2"},"issue":{"href":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/issues/2"},"comments":{"href":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/HyphenateInc/IMDemo_ios/statuses/c4bf1730ba028246285dbb33cb80f1a8d005f451"}}}}
{"actor":{"display_login":"Neil-Cao"}}