{"action":"created","comment":{"url":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/comments/236398204","pull_request_review_id":178465536,"id":236398204,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjM5ODIwNA==","diff_hunk":"@@ -114,21 +114,47 @@ class ChannelDetails extends Component {\n     let pendingInvites = [];\n     if (channel.channel_mod_ids.includes(window.currentUser.id)) {\n       // eslint-disable-next-line\n-      searchedUsers = this.state.searchedUsers.map(user => (\n-        <div className=\"channeldetails__searchedusers\">\n-          <a href={user.path} target=\"_blank\" rel=\"noopener noreferrer\">\n-            {user.title}\n-          </a>\n-          {' '}\n+      searchedUsers = this.state.searchedUsers.map(user => {\n+        let invite = (\n           <button\n             type=\"button\"\n             onClick={this.triggerInvite}\n             data-content={user.id}\n           >\n             Invite\n           </button>\n-        </div>\n-      ));\n+        );\n+        if (channel.channel_users.includes(user)) {","path":"app/javascript/chat/channelDetails.jsx","position":22,"original_position":22,"commit_id":"6539d2dbd18ffee44bc048891a1633d036a3786f","original_commit_id":"6539d2dbd18ffee44bc048891a1633d036a3786f","user":{"login":"benhalpern","id":3102842,"node_id":"MDQ6VXNlcjMxMDI4NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/3102842?v=4","gravatar_id":"","url":"https://api.github.com/users/benhalpern","html_url":"https://github.com/benhalpern","followers_url":"https://api.github.com/users/benhalpern/followers","following_url":"https://api.github.com/users/benhalpern/following{/other_user}","gists_url":"https://api.github.com/users/benhalpern/gists{/gist_id}","starred_url":"https://api.github.com/users/benhalpern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benhalpern/subscriptions","organizations_url":"https://api.github.com/users/benhalpern/orgs","repos_url":"https://api.github.com/users/benhalpern/repos","events_url":"https://api.github.com/users/benhalpern/events{/privacy}","received_events_url":"https://api.github.com/users/benhalpern/received_events","type":"User","site_admin":false},"body":"Hmmm I’m not sure they’d be the equivalent objects. So `user === otherUser` may not be work, but `user.username === otherUser.username` should work correctly. They may be. I’m just not sure.\r\n\r\nI say I'm not sure because I'm not sure. This _may_ work. Not totally sure of the whole context here.","created_at":"2018-11-26T19:39:30Z","updated_at":"2018-11-26T19:40:40Z","html_url":"https://github.com/thepracticaldev/dev.to/pull/1201#discussion_r236398204","pull_request_url":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/1201","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/comments/236398204"},"html":{"href":"https://github.com/thepracticaldev/dev.to/pull/1201#discussion_r236398204"},"pull_request":{"href":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/1201"}}},"pull_request":{"url":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/1201","id":233648859,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNjQ4ODU5","html_url":"https://github.com/thepracticaldev/dev.to/pull/1201","diff_url":"https://github.com/thepracticaldev/dev.to/pull/1201.diff","patch_url":"https://github.com/thepracticaldev/dev.to/pull/1201.patch","issue_url":"https://api.github.com/repos/thepracticaldev/dev.to/issues/1201","number":1201,"state":"open","locked":false,"title":"[WIP] connect channel invites ","user":{"login":"mariocsee","id":13403332,"node_id":"MDQ6VXNlcjEzNDAzMzMy","avatar_url":"https://avatars0.githubusercontent.com/u/13403332?v=4","gravatar_id":"","url":"https://api.github.com/users/mariocsee","html_url":"https://github.com/mariocsee","followers_url":"https://api.github.com/users/mariocsee/followers","following_url":"https://api.github.com/users/mariocsee/following{/other_user}","gists_url":"https://api.github.com/users/mariocsee/gists{/gist_id}","starred_url":"https://api.github.com/users/mariocsee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariocsee/subscriptions","organizations_url":"https://api.github.com/users/mariocsee/orgs","repos_url":"https://api.github.com/users/mariocsee/repos","events_url":"https://api.github.com/users/mariocsee/events{/privacy}","received_events_url":"https://api.github.com/users/mariocsee/received_events","type":"User","site_admin":false},"body":"## What type of PR is this? (check all applicable)\r\n\r\n- [ ] Refactor\r\n- [ ] Feature\r\n- [x] Bug Fix\r\n- [ ] Documentation Update\r\n\r\n## Description\r\nWhen searching for users to invite to a channel, users that are already members or already invited can still be invited because of how the invite button is given to each user in the search result. The search results are also vague, so profile pictures and usernames will be added so you can invite the Ben you're looking for. \r\n\r\nTo avoid this, users that are already members or have been invited will not be given an invite button but instead a message 'xyz is already in channel abc' or 'xyz has already been invited to channel abc'. Additional styling will also be done. \r\n\r\n## Related Tickets & Documents\r\nNone that I know of.\r\n\r\n## Mobile & Desktop Screenshots/Recordings (if there are UI changes)\r\n![](https://cl.ly/be79123a2023/Image%202018-11-19%20at%203.27.52%20PM.png)\r\n\r\n## Added to documentation?\r\n\r\n- [ ] docs.dev.to\r\n- [ ] readme\r\n- [x] no documentation needed\r\n\r\n## [optional] What gif best describes this PR or how it makes you feel?\r\n\r\n![](https://media1.tenor.com/images/462a46396438611aa76c9e2e7ddbadf2/tenor.gif)\r\n","created_at":"2018-11-26T18:06:27Z","updated_at":"2018-11-26T19:40:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f811593beda58659892e2501e22f05915664241d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/1201/commits","review_comments_url":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/1201/comments","review_comment_url":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thepracticaldev/dev.to/issues/1201/comments","statuses_url":"https://api.github.com/repos/thepracticaldev/dev.to/statuses/6539d2dbd18ffee44bc048891a1633d036a3786f","head":{"label":"mariocsee:connect-channel-invites","ref":"connect-channel-invites","sha":"6539d2dbd18ffee44bc048891a1633d036a3786f","user":{"login":"mariocsee","id":13403332,"node_id":"MDQ6VXNlcjEzNDAzMzMy","avatar_url":"https://avatars0.githubusercontent.com/u/13403332?v=4","gravatar_id":"","url":"https://api.github.com/users/mariocsee","html_url":"https://github.com/mariocsee","followers_url":"https://api.github.com/users/mariocsee/followers","following_url":"https://api.github.com/users/mariocsee/following{/other_user}","gists_url":"https://api.github.com/users/mariocsee/gists{/gist_id}","starred_url":"https://api.github.com/users/mariocsee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariocsee/subscriptions","organizations_url":"https://api.github.com/users/mariocsee/orgs","repos_url":"https://api.github.com/users/mariocsee/repos","events_url":"https://api.github.com/users/mariocsee/events{/privacy}","received_events_url":"https://api.github.com/users/mariocsee/received_events","type":"User","site_admin":false},"repo":{"id":159202160,"node_id":"MDEwOlJlcG9zaXRvcnkxNTkyMDIxNjA=","name":"dev.to","full_name":"mariocsee/dev.to","private":false,"owner":{"login":"mariocsee","id":13403332,"node_id":"MDQ6VXNlcjEzNDAzMzMy","avatar_url":"https://avatars0.githubusercontent.com/u/13403332?v=4","gravatar_id":"","url":"https://api.github.com/users/mariocsee","html_url":"https://github.com/mariocsee","followers_url":"https://api.github.com/users/mariocsee/followers","following_url":"https://api.github.com/users/mariocsee/following{/other_user}","gists_url":"https://api.github.com/users/mariocsee/gists{/gist_id}","starred_url":"https://api.github.com/users/mariocsee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariocsee/subscriptions","organizations_url":"https://api.github.com/users/mariocsee/orgs","repos_url":"https://api.github.com/users/mariocsee/repos","events_url":"https://api.github.com/users/mariocsee/events{/privacy}","received_events_url":"https://api.github.com/users/mariocsee/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mariocsee/dev.to","description":"Where programmers share ideas and help each other grow","fork":true,"url":"https://api.github.com/repos/mariocsee/dev.to","forks_url":"https://api.github.com/repos/mariocsee/dev.to/forks","keys_url":"https://api.github.com/repos/mariocsee/dev.to/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mariocsee/dev.to/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mariocsee/dev.to/teams","hooks_url":"https://api.github.com/repos/mariocsee/dev.to/hooks","issue_events_url":"https://api.github.com/repos/mariocsee/dev.to/issues/events{/number}","events_url":"https://api.github.com/repos/mariocsee/dev.to/events","assignees_url":"https://api.github.com/repos/mariocsee/dev.to/assignees{/user}","branches_url":"https://api.github.com/repos/mariocsee/dev.to/branches{/branch}","tags_url":"https://api.github.com/repos/mariocsee/dev.to/tags","blobs_url":"https://api.github.com/repos/mariocsee/dev.to/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mariocsee/dev.to/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mariocsee/dev.to/git/refs{/sha}","trees_url":"https://api.github.com/repos/mariocsee/dev.to/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mariocsee/dev.to/statuses/{sha}","languages_url":"https://api.github.com/repos/mariocsee/dev.to/languages","stargazers_url":"https://api.github.com/repos/mariocsee/dev.to/stargazers","contributors_url":"https://api.github.com/repos/mariocsee/dev.to/contributors","subscribers_url":"https://api.github.com/repos/mariocsee/dev.to/subscribers","subscription_url":"https://api.github.com/repos/mariocsee/dev.to/subscription","commits_url":"https://api.github.com/repos/mariocsee/dev.to/commits{/sha}","git_commits_url":"https://api.github.com/repos/mariocsee/dev.to/git/commits{/sha}","comments_url":"https://api.github.com/repos/mariocsee/dev.to/comments{/number}","issue_comment_url":"https://api.github.com/repos/mariocsee/dev.to/issues/comments{/number}","contents_url":"https://api.github.com/repos/mariocsee/dev.to/contents/{+path}","compare_url":"https://api.github.com/repos/mariocsee/dev.to/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mariocsee/dev.to/merges","archive_url":"https://api.github.com/repos/mariocsee/dev.to/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mariocsee/dev.to/downloads","issues_url":"https://api.github.com/repos/mariocsee/dev.to/issues{/number}","pulls_url":"https://api.github.com/repos/mariocsee/dev.to/pulls{/number}","milestones_url":"https://api.github.com/repos/mariocsee/dev.to/milestones{/number}","notifications_url":"https://api.github.com/repos/mariocsee/dev.to/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mariocsee/dev.to/labels{/name}","releases_url":"https://api.github.com/repos/mariocsee/dev.to/releases{/id}","deployments_url":"https://api.github.com/repos/mariocsee/dev.to/deployments","created_at":"2018-11-26T16:48:26Z","updated_at":"2018-11-26T16:48:31Z","pushed_at":"2018-11-26T19:24:06Z","git_url":"git://github.com/mariocsee/dev.to.git","ssh_url":"git@github.com:mariocsee/dev.to.git","clone_url":"https://github.com/mariocsee/dev.to.git","svn_url":"https://github.com/mariocsee/dev.to","homepage":"https://dev.to","size":22063,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"thepracticaldev:master","ref":"master","sha":"10081c4719983aafcecf11d47e7e0e2e18825334","user":{"login":"thepracticaldev","id":13521919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNTIxOTE5","avatar_url":"https://avatars1.githubusercontent.com/u/13521919?v=4","gravatar_id":"","url":"https://api.github.com/users/thepracticaldev","html_url":"https://github.com/thepracticaldev","followers_url":"https://api.github.com/users/thepracticaldev/followers","following_url":"https://api.github.com/users/thepracticaldev/following{/other_user}","gists_url":"https://api.github.com/users/thepracticaldev/gists{/gist_id}","starred_url":"https://api.github.com/users/thepracticaldev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thepracticaldev/subscriptions","organizations_url":"https://api.github.com/users/thepracticaldev/orgs","repos_url":"https://api.github.com/users/thepracticaldev/repos","events_url":"https://api.github.com/users/thepracticaldev/events{/privacy}","received_events_url":"https://api.github.com/users/thepracticaldev/received_events","type":"Organization","site_admin":false},"repo":{"id":73648678,"node_id":"MDEwOlJlcG9zaXRvcnk3MzY0ODY3OA==","name":"dev.to","full_name":"thepracticaldev/dev.to","private":false,"owner":{"login":"thepracticaldev","id":13521919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNTIxOTE5","avatar_url":"https://avatars1.githubusercontent.com/u/13521919?v=4","gravatar_id":"","url":"https://api.github.com/users/thepracticaldev","html_url":"https://github.com/thepracticaldev","followers_url":"https://api.github.com/users/thepracticaldev/followers","following_url":"https://api.github.com/users/thepracticaldev/following{/other_user}","gists_url":"https://api.github.com/users/thepracticaldev/gists{/gist_id}","starred_url":"https://api.github.com/users/thepracticaldev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thepracticaldev/subscriptions","organizations_url":"https://api.github.com/users/thepracticaldev/orgs","repos_url":"https://api.github.com/users/thepracticaldev/repos","events_url":"https://api.github.com/users/thepracticaldev/events{/privacy}","received_events_url":"https://api.github.com/users/thepracticaldev/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/thepracticaldev/dev.to","description":"Where programmers share ideas and help each other grow","fork":false,"url":"https://api.github.com/repos/thepracticaldev/dev.to","forks_url":"https://api.github.com/repos/thepracticaldev/dev.to/forks","keys_url":"https://api.github.com/repos/thepracticaldev/dev.to/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thepracticaldev/dev.to/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thepracticaldev/dev.to/teams","hooks_url":"https://api.github.com/repos/thepracticaldev/dev.to/hooks","issue_events_url":"https://api.github.com/repos/thepracticaldev/dev.to/issues/events{/number}","events_url":"https://api.github.com/repos/thepracticaldev/dev.to/events","assignees_url":"https://api.github.com/repos/thepracticaldev/dev.to/assignees{/user}","branches_url":"https://api.github.com/repos/thepracticaldev/dev.to/branches{/branch}","tags_url":"https://api.github.com/repos/thepracticaldev/dev.to/tags","blobs_url":"https://api.github.com/repos/thepracticaldev/dev.to/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thepracticaldev/dev.to/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thepracticaldev/dev.to/git/refs{/sha}","trees_url":"https://api.github.com/repos/thepracticaldev/dev.to/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thepracticaldev/dev.to/statuses/{sha}","languages_url":"https://api.github.com/repos/thepracticaldev/dev.to/languages","stargazers_url":"https://api.github.com/repos/thepracticaldev/dev.to/stargazers","contributors_url":"https://api.github.com/repos/thepracticaldev/dev.to/contributors","subscribers_url":"https://api.github.com/repos/thepracticaldev/dev.to/subscribers","subscription_url":"https://api.github.com/repos/thepracticaldev/dev.to/subscription","commits_url":"https://api.github.com/repos/thepracticaldev/dev.to/commits{/sha}","git_commits_url":"https://api.github.com/repos/thepracticaldev/dev.to/git/commits{/sha}","comments_url":"https://api.github.com/repos/thepracticaldev/dev.to/comments{/number}","issue_comment_url":"https://api.github.com/repos/thepracticaldev/dev.to/issues/comments{/number}","contents_url":"https://api.github.com/repos/thepracticaldev/dev.to/contents/{+path}","compare_url":"https://api.github.com/repos/thepracticaldev/dev.to/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thepracticaldev/dev.to/merges","archive_url":"https://api.github.com/repos/thepracticaldev/dev.to/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thepracticaldev/dev.to/downloads","issues_url":"https://api.github.com/repos/thepracticaldev/dev.to/issues{/number}","pulls_url":"https://api.github.com/repos/thepracticaldev/dev.to/pulls{/number}","milestones_url":"https://api.github.com/repos/thepracticaldev/dev.to/milestones{/number}","notifications_url":"https://api.github.com/repos/thepracticaldev/dev.to/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thepracticaldev/dev.to/labels{/name}","releases_url":"https://api.github.com/repos/thepracticaldev/dev.to/releases{/id}","deployments_url":"https://api.github.com/repos/thepracticaldev/dev.to/deployments","created_at":"2016-11-13T23:02:13Z","updated_at":"2018-11-26T19:27:46Z","pushed_at":"2018-11-26T19:24:08Z","git_url":"git://github.com/thepracticaldev/dev.to.git","ssh_url":"git@github.com:thepracticaldev/dev.to.git","clone_url":"https://github.com/thepracticaldev/dev.to.git","svn_url":"https://github.com/thepracticaldev/dev.to","homepage":"https://dev.to","size":22070,"stargazers_count":7570,"watchers_count":7570,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":737,"mirror_url":null,"archived":false,"open_issues_count":253,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":737,"open_issues":253,"watchers":7570,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/1201"},"html":{"href":"https://github.com/thepracticaldev/dev.to/pull/1201"},"issue":{"href":"https://api.github.com/repos/thepracticaldev/dev.to/issues/1201"},"comments":{"href":"https://api.github.com/repos/thepracticaldev/dev.to/issues/1201/comments"},"review_comments":{"href":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/1201/comments"},"review_comment":{"href":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thepracticaldev/dev.to/pulls/1201/commits"},"statuses":{"href":"https://api.github.com/repos/thepracticaldev/dev.to/statuses/6539d2dbd18ffee44bc048891a1633d036a3786f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"benhalpern"}}