{"action":"created","comment":{"url":"https://api.github.com/repos/mattstauffer/confomo/pulls/comments/72669847","id":72669847,"diff_hunk":"@@ -82,12 +82,18 @@ public function onlineFriends()\n \n     public function makeIntroduction($username)\n     {\n-        $friend = new Friend([\n-            'username' => $this->normalizeFriendName($username),\n-            'type' => $this->isUpcoming() ? 'online' : 'new',\n-            'introduction' => true,\n-            'met' => ! $this->isUpcoming(),\n-        ]);\n+        $friend = Friend::firstOrNew(['username' => $this->normalizeFriendName($username)]);\n+\n+        if ($friend->id) {","path":"app/Conference.php","position":12,"original_position":12,"commit_id":"e15ad782a6b103bbbabce64c9898e31b9d74ea3a","original_commit_id":"e15ad782a6b103bbbabce64c9898e31b9d74ea3a","user":{"login":"mattstauffer","id":151829,"avatar_url":"https://avatars.githubusercontent.com/u/151829?v=3","gravatar_id":"","url":"https://api.github.com/users/mattstauffer","html_url":"https://github.com/mattstauffer","followers_url":"https://api.github.com/users/mattstauffer/followers","following_url":"https://api.github.com/users/mattstauffer/following{/other_user}","gists_url":"https://api.github.com/users/mattstauffer/gists{/gist_id}","starred_url":"https://api.github.com/users/mattstauffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattstauffer/subscriptions","organizations_url":"https://api.github.com/users/mattstauffer/orgs","repos_url":"https://api.github.com/users/mattstauffer/repos","events_url":"https://api.github.com/users/mattstauffer/events{/privacy}","received_events_url":"https://api.github.com/users/mattstauffer/received_events","type":"User","site_admin":false},"body":"Feels like there might be a more elegant way to do this. ","created_at":"2016-07-28T17:55:39Z","updated_at":"2016-07-28T17:55:39Z","html_url":"https://github.com/mattstauffer/confomo/pull/51#discussion_r72669847","pull_request_url":"https://api.github.com/repos/mattstauffer/confomo/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/mattstauffer/confomo/pulls/comments/72669847"},"html":{"href":"https://github.com/mattstauffer/confomo/pull/51#discussion_r72669847"},"pull_request":{"href":"https://api.github.com/repos/mattstauffer/confomo/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/mattstauffer/confomo/pulls/51","id":79235357,"html_url":"https://github.com/mattstauffer/confomo/pull/51","diff_url":"https://github.com/mattstauffer/confomo/pull/51.diff","patch_url":"https://github.com/mattstauffer/confomo/pull/51.patch","issue_url":"https://api.github.com/repos/mattstauffer/confomo/issues/51","number":51,"state":"open","locked":false,"title":"When making an introduction, update an existing friend record","user":{"login":"michaeldyrynda","id":558441,"avatar_url":"https://avatars.githubusercontent.com/u/558441?v=3","gravatar_id":"","url":"https://api.github.com/users/michaeldyrynda","html_url":"https://github.com/michaeldyrynda","followers_url":"https://api.github.com/users/michaeldyrynda/followers","following_url":"https://api.github.com/users/michaeldyrynda/following{/other_user}","gists_url":"https://api.github.com/users/michaeldyrynda/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeldyrynda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeldyrynda/subscriptions","organizations_url":"https://api.github.com/users/michaeldyrynda/orgs","repos_url":"https://api.github.com/users/michaeldyrynda/repos","events_url":"https://api.github.com/users/michaeldyrynda/events{/privacy}","received_events_url":"https://api.github.com/users/michaeldyrynda/received_events","type":"User","site_admin":false},"body":"This will prevent cases where a user adds a friend they want to meet, who subsequently introduces themselves, and ends up on the friend list twice.","created_at":"2016-07-28T17:24:36Z","updated_at":"2016-07-28T17:55:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd32e0dd19ec3051f7b019d9d0a4be3cf8a7d268","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mattstauffer/confomo/pulls/51/commits","review_comments_url":"https://api.github.com/repos/mattstauffer/confomo/pulls/51/comments","review_comment_url":"https://api.github.com/repos/mattstauffer/confomo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mattstauffer/confomo/issues/51/comments","statuses_url":"https://api.github.com/repos/mattstauffer/confomo/statuses/e15ad782a6b103bbbabce64c9898e31b9d74ea3a","head":{"label":"michaeldyrynda:existing-friend-check","ref":"existing-friend-check","sha":"e15ad782a6b103bbbabce64c9898e31b9d74ea3a","user":{"login":"michaeldyrynda","id":558441,"avatar_url":"https://avatars.githubusercontent.com/u/558441?v=3","gravatar_id":"","url":"https://api.github.com/users/michaeldyrynda","html_url":"https://github.com/michaeldyrynda","followers_url":"https://api.github.com/users/michaeldyrynda/followers","following_url":"https://api.github.com/users/michaeldyrynda/following{/other_user}","gists_url":"https://api.github.com/users/michaeldyrynda/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeldyrynda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeldyrynda/subscriptions","organizations_url":"https://api.github.com/users/michaeldyrynda/orgs","repos_url":"https://api.github.com/users/michaeldyrynda/repos","events_url":"https://api.github.com/users/michaeldyrynda/events{/privacy}","received_events_url":"https://api.github.com/users/michaeldyrynda/received_events","type":"User","site_admin":false},"repo":{"id":63829694,"name":"confomo","full_name":"michaeldyrynda/confomo","owner":{"login":"michaeldyrynda","id":558441,"avatar_url":"https://avatars.githubusercontent.com/u/558441?v=3","gravatar_id":"","url":"https://api.github.com/users/michaeldyrynda","html_url":"https://github.com/michaeldyrynda","followers_url":"https://api.github.com/users/michaeldyrynda/followers","following_url":"https://api.github.com/users/michaeldyrynda/following{/other_user}","gists_url":"https://api.github.com/users/michaeldyrynda/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeldyrynda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeldyrynda/subscriptions","organizations_url":"https://api.github.com/users/michaeldyrynda/orgs","repos_url":"https://api.github.com/users/michaeldyrynda/repos","events_url":"https://api.github.com/users/michaeldyrynda/events{/privacy}","received_events_url":"https://api.github.com/users/michaeldyrynda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michaeldyrynda/confomo","description":"Confomo","fork":true,"url":"https://api.github.com/repos/michaeldyrynda/confomo","forks_url":"https://api.github.com/repos/michaeldyrynda/confomo/forks","keys_url":"https://api.github.com/repos/michaeldyrynda/confomo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michaeldyrynda/confomo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michaeldyrynda/confomo/teams","hooks_url":"https://api.github.com/repos/michaeldyrynda/confomo/hooks","issue_events_url":"https://api.github.com/repos/michaeldyrynda/confomo/issues/events{/number}","events_url":"https://api.github.com/repos/michaeldyrynda/confomo/events","assignees_url":"https://api.github.com/repos/michaeldyrynda/confomo/assignees{/user}","branches_url":"https://api.github.com/repos/michaeldyrynda/confomo/branches{/branch}","tags_url":"https://api.github.com/repos/michaeldyrynda/confomo/tags","blobs_url":"https://api.github.com/repos/michaeldyrynda/confomo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michaeldyrynda/confomo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michaeldyrynda/confomo/git/refs{/sha}","trees_url":"https://api.github.com/repos/michaeldyrynda/confomo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michaeldyrynda/confomo/statuses/{sha}","languages_url":"https://api.github.com/repos/michaeldyrynda/confomo/languages","stargazers_url":"https://api.github.com/repos/michaeldyrynda/confomo/stargazers","contributors_url":"https://api.github.com/repos/michaeldyrynda/confomo/contributors","subscribers_url":"https://api.github.com/repos/michaeldyrynda/confomo/subscribers","subscription_url":"https://api.github.com/repos/michaeldyrynda/confomo/subscription","commits_url":"https://api.github.com/repos/michaeldyrynda/confomo/commits{/sha}","git_commits_url":"https://api.github.com/repos/michaeldyrynda/confomo/git/commits{/sha}","comments_url":"https://api.github.com/repos/michaeldyrynda/confomo/comments{/number}","issue_comment_url":"https://api.github.com/repos/michaeldyrynda/confomo/issues/comments{/number}","contents_url":"https://api.github.com/repos/michaeldyrynda/confomo/contents/{+path}","compare_url":"https://api.github.com/repos/michaeldyrynda/confomo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michaeldyrynda/confomo/merges","archive_url":"https://api.github.com/repos/michaeldyrynda/confomo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michaeldyrynda/confomo/downloads","issues_url":"https://api.github.com/repos/michaeldyrynda/confomo/issues{/number}","pulls_url":"https://api.github.com/repos/michaeldyrynda/confomo/pulls{/number}","milestones_url":"https://api.github.com/repos/michaeldyrynda/confomo/milestones{/number}","notifications_url":"https://api.github.com/repos/michaeldyrynda/confomo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michaeldyrynda/confomo/labels{/name}","releases_url":"https://api.github.com/repos/michaeldyrynda/confomo/releases{/id}","deployments_url":"https://api.github.com/repos/michaeldyrynda/confomo/deployments","created_at":"2016-07-21T02:19:33Z","updated_at":"2016-07-21T02:19:34Z","pushed_at":"2016-07-28T17:24:17Z","git_url":"git://github.com/michaeldyrynda/confomo.git","ssh_url":"git@github.com:michaeldyrynda/confomo.git","clone_url":"https://github.com/michaeldyrynda/confomo.git","svn_url":"https://github.com/michaeldyrynda/confomo","homepage":"","size":2322,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"mattstauffer:master","ref":"master","sha":"6e26744982aafc0f8068d305762a65655ad28e6f","user":{"login":"mattstauffer","id":151829,"avatar_url":"https://avatars.githubusercontent.com/u/151829?v=3","gravatar_id":"","url":"https://api.github.com/users/mattstauffer","html_url":"https://github.com/mattstauffer","followers_url":"https://api.github.com/users/mattstauffer/followers","following_url":"https://api.github.com/users/mattstauffer/following{/other_user}","gists_url":"https://api.github.com/users/mattstauffer/gists{/gist_id}","starred_url":"https://api.github.com/users/mattstauffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattstauffer/subscriptions","organizations_url":"https://api.github.com/users/mattstauffer/orgs","repos_url":"https://api.github.com/users/mattstauffer/repos","events_url":"https://api.github.com/users/mattstauffer/events{/privacy}","received_events_url":"https://api.github.com/users/mattstauffer/received_events","type":"User","site_admin":false},"repo":{"id":19512378,"name":"confomo","full_name":"mattstauffer/confomo","owner":{"login":"mattstauffer","id":151829,"avatar_url":"https://avatars.githubusercontent.com/u/151829?v=3","gravatar_id":"","url":"https://api.github.com/users/mattstauffer","html_url":"https://github.com/mattstauffer","followers_url":"https://api.github.com/users/mattstauffer/followers","following_url":"https://api.github.com/users/mattstauffer/following{/other_user}","gists_url":"https://api.github.com/users/mattstauffer/gists{/gist_id}","starred_url":"https://api.github.com/users/mattstauffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattstauffer/subscriptions","organizations_url":"https://api.github.com/users/mattstauffer/orgs","repos_url":"https://api.github.com/users/mattstauffer/repos","events_url":"https://api.github.com/users/mattstauffer/events{/privacy}","received_events_url":"https://api.github.com/users/mattstauffer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mattstauffer/confomo","description":"Confomo","fork":false,"url":"https://api.github.com/repos/mattstauffer/confomo","forks_url":"https://api.github.com/repos/mattstauffer/confomo/forks","keys_url":"https://api.github.com/repos/mattstauffer/confomo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattstauffer/confomo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattstauffer/confomo/teams","hooks_url":"https://api.github.com/repos/mattstauffer/confomo/hooks","issue_events_url":"https://api.github.com/repos/mattstauffer/confomo/issues/events{/number}","events_url":"https://api.github.com/repos/mattstauffer/confomo/events","assignees_url":"https://api.github.com/repos/mattstauffer/confomo/assignees{/user}","branches_url":"https://api.github.com/repos/mattstauffer/confomo/branches{/branch}","tags_url":"https://api.github.com/repos/mattstauffer/confomo/tags","blobs_url":"https://api.github.com/repos/mattstauffer/confomo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattstauffer/confomo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattstauffer/confomo/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattstauffer/confomo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattstauffer/confomo/statuses/{sha}","languages_url":"https://api.github.com/repos/mattstauffer/confomo/languages","stargazers_url":"https://api.github.com/repos/mattstauffer/confomo/stargazers","contributors_url":"https://api.github.com/repos/mattstauffer/confomo/contributors","subscribers_url":"https://api.github.com/repos/mattstauffer/confomo/subscribers","subscription_url":"https://api.github.com/repos/mattstauffer/confomo/subscription","commits_url":"https://api.github.com/repos/mattstauffer/confomo/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattstauffer/confomo/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattstauffer/confomo/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattstauffer/confomo/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattstauffer/confomo/contents/{+path}","compare_url":"https://api.github.com/repos/mattstauffer/confomo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattstauffer/confomo/merges","archive_url":"https://api.github.com/repos/mattstauffer/confomo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattstauffer/confomo/downloads","issues_url":"https://api.github.com/repos/mattstauffer/confomo/issues{/number}","pulls_url":"https://api.github.com/repos/mattstauffer/confomo/pulls{/number}","milestones_url":"https://api.github.com/repos/mattstauffer/confomo/milestones{/number}","notifications_url":"https://api.github.com/repos/mattstauffer/confomo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattstauffer/confomo/labels{/name}","releases_url":"https://api.github.com/repos/mattstauffer/confomo/releases{/id}","deployments_url":"https://api.github.com/repos/mattstauffer/confomo/deployments","created_at":"2014-05-06T22:00:13Z","updated_at":"2016-07-27T16:10:42Z","pushed_at":"2016-07-28T17:52:01Z","git_url":"git://github.com/mattstauffer/confomo.git","ssh_url":"git@github.com:mattstauffer/confomo.git","clone_url":"https://github.com/mattstauffer/confomo.git","svn_url":"https://github.com/mattstauffer/confomo","homepage":"","size":2285,"stargazers_count":24,"watchers_count":24,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":10,"forks":14,"open_issues":10,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mattstauffer/confomo/pulls/51"},"html":{"href":"https://github.com/mattstauffer/confomo/pull/51"},"issue":{"href":"https://api.github.com/repos/mattstauffer/confomo/issues/51"},"comments":{"href":"https://api.github.com/repos/mattstauffer/confomo/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/mattstauffer/confomo/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/mattstauffer/confomo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mattstauffer/confomo/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/mattstauffer/confomo/statuses/e15ad782a6b103bbbabce64c9898e31b9d74ea3a"}}}}
{"actor":{"display_login":"mattstauffer"}}