{"action":"created","comment":{"url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/comments/57497253","id":57497253,"diff_hunk":"@@ -34,6 +31,18 @@ public function test_user_cannot_add_the_same_friend_twice()\n         $this->assertEquals(1, $friends->count());\n     }\n \n+    public function test_it_marks_friend_as_blacklisted()","path":"tests/FriendTest.php","position":16,"original_position":16,"commit_id":"5d383bbd7192ce951fecbc50b2017fe018471eb4","original_commit_id":"5d383bbd7192ce951fecbc50b2017fe018471eb4","user":{"login":"Nitpick-CI","id":12626182,"avatar_url":"https://avatars.githubusercontent.com/u/12626182?v=3","gravatar_id":"","url":"https://api.github.com/users/Nitpick-CI","html_url":"https://github.com/Nitpick-CI","followers_url":"https://api.github.com/users/Nitpick-CI/followers","following_url":"https://api.github.com/users/Nitpick-CI/following{/other_user}","gists_url":"https://api.github.com/users/Nitpick-CI/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitpick-CI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitpick-CI/subscriptions","organizations_url":"https://api.github.com/users/Nitpick-CI/orgs","repos_url":"https://api.github.com/users/Nitpick-CI/repos","events_url":"https://api.github.com/users/Nitpick-CI/events{/privacy}","received_events_url":"https://api.github.com/users/Nitpick-CI/received_events","type":"User","site_admin":false},"body":"Method name `FriendTest::test_it_marks_friend_as_blacklisted` is not in camel caps format","created_at":"2016-03-25T22:15:40Z","updated_at":"2016-03-25T22:15:40Z","html_url":"https://github.com/mattstauffer/pulledover/pull/30#discussion_r57497253","pull_request_url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/comments/57497253"},"html":{"href":"https://github.com/mattstauffer/pulledover/pull/30#discussion_r57497253"},"pull_request":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/30","id":64213718,"html_url":"https://github.com/mattstauffer/pulledover/pull/30","diff_url":"https://github.com/mattstauffer/pulledover/pull/30.diff","patch_url":"https://github.com/mattstauffer/pulledover/pull/30.patch","issue_url":"https://api.github.com/repos/mattstauffer/pulledover/issues/30","number":30,"state":"open","locked":false,"title":"Handle twilio error 21610 (Customer replied with \"STOP\") [IN PROGRESS]","user":{"login":"RDelorier","id":2295675,"avatar_url":"https://avatars.githubusercontent.com/u/2295675?v=3","gravatar_id":"","url":"https://api.github.com/users/RDelorier","html_url":"https://github.com/RDelorier","followers_url":"https://api.github.com/users/RDelorier/followers","following_url":"https://api.github.com/users/RDelorier/following{/other_user}","gists_url":"https://api.github.com/users/RDelorier/gists{/gist_id}","starred_url":"https://api.github.com/users/RDelorier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RDelorier/subscriptions","organizations_url":"https://api.github.com/users/RDelorier/orgs","repos_url":"https://api.github.com/users/RDelorier/repos","events_url":"https://api.github.com/users/RDelorier/events{/privacy}","received_events_url":"https://api.github.com/users/RDelorier/received_events","type":"User","site_admin":false},"body":"When someone text \"STOP\" to the apps twilio number they are added  to the \"blacklisted\" numbers meaning this app may no longer send them texts. Any subsequent texts the blacklisted number will result in a twilio error with code 21610. The changes in this pull request aim to handle that error.\r\n\r\n### Migrations\r\nAdded phone_number_id to recordings to create the relationship and make it easier to determine which number a recording came from.\r\nAdded blacklisted to phone_numbers and friends\r\n\r\n### Blacklisted Models\r\nBoth PhoneNumber and Friend have a new method named markBlacklisted that when called will set the value of blacklisted to true and fire a {$classname}WasBlacklisted event.\r\n\r\n***This pull request does not implement any handlers for these events, they are fired to allow handlers to be attached so the user can be notified***\r\n\r\nThe \"verified\" query scope on both models now specifies that blacklisted should equal false.\r\n\r\nThe models were also given a \"status\" appended attribute to make it easier to display the status and icon to the user.\r\n\r\n#### Blacklisted Icon\r\nThe phone-number icon now has a separate icon when the \"blacklisted\" class is present, this works well with the status attribute.\r\n\r\n<img width=\"151\" alt=\"screen shot 2016-03-25 at 6 12 38 pm\" src=\"https://cloud.githubusercontent.com/assets/2295675/14055094/35f88fc6-f2b5-11e5-86e0-e3c19ad1780c.png\">\r\n\r\n### TwilioRequest\r\nThe routes that interact with twilio now require a twilio request which provides the phoneNumber method which finds the PhoneNumber based on the incoming reqest data.\r\n***The authorize method needs to be updated to verify that the request is actually coming from twilio***\r\n\r\n### Jobs\r\nTo reduce the number of places that the error could occur I merged the separate jobs for verifying and notifying user and friends.\r\n- SendNewRecordingNotifications takes the place of\r\n   - NotifyFriendsOfRecording\r\n   - NotifyOwnerOfRecording\r\n- VerifyPhoneNumber takes the place of\r\n   - VerifyPhoneNumberFriendship\r\n   - VerifyPhoneNumberOwnership\r\n\r\nWhen sending a text to either a phone number or a friend results in a blacklisted exception the markBlacklisted method is called on the offending model.","created_at":"2016-03-25T22:15:25Z","updated_at":"2016-03-25T22:15:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"217b0617480b93656d70ae5274f002e053b97099","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/30/commits","review_comments_url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/30/comments","review_comment_url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mattstauffer/pulledover/issues/30/comments","statuses_url":"https://api.github.com/repos/mattstauffer/pulledover/statuses/5d383bbd7192ce951fecbc50b2017fe018471eb4","head":{"label":"RDelorier:handle-twilio-error-21610","ref":"handle-twilio-error-21610","sha":"5d383bbd7192ce951fecbc50b2017fe018471eb4","user":{"login":"RDelorier","id":2295675,"avatar_url":"https://avatars.githubusercontent.com/u/2295675?v=3","gravatar_id":"","url":"https://api.github.com/users/RDelorier","html_url":"https://github.com/RDelorier","followers_url":"https://api.github.com/users/RDelorier/followers","following_url":"https://api.github.com/users/RDelorier/following{/other_user}","gists_url":"https://api.github.com/users/RDelorier/gists{/gist_id}","starred_url":"https://api.github.com/users/RDelorier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RDelorier/subscriptions","organizations_url":"https://api.github.com/users/RDelorier/orgs","repos_url":"https://api.github.com/users/RDelorier/repos","events_url":"https://api.github.com/users/RDelorier/events{/privacy}","received_events_url":"https://api.github.com/users/RDelorier/received_events","type":"User","site_admin":false},"repo":{"id":53017547,"name":"pulledover","full_name":"RDelorier/pulledover","owner":{"login":"RDelorier","id":2295675,"avatar_url":"https://avatars.githubusercontent.com/u/2295675?v=3","gravatar_id":"","url":"https://api.github.com/users/RDelorier","html_url":"https://github.com/RDelorier","followers_url":"https://api.github.com/users/RDelorier/followers","following_url":"https://api.github.com/users/RDelorier/following{/other_user}","gists_url":"https://api.github.com/users/RDelorier/gists{/gist_id}","starred_url":"https://api.github.com/users/RDelorier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RDelorier/subscriptions","organizations_url":"https://api.github.com/users/RDelorier/orgs","repos_url":"https://api.github.com/users/RDelorier/repos","events_url":"https://api.github.com/users/RDelorier/events{/privacy}","received_events_url":"https://api.github.com/users/RDelorier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RDelorier/pulledover","description":"Pulled Over App","fork":true,"url":"https://api.github.com/repos/RDelorier/pulledover","forks_url":"https://api.github.com/repos/RDelorier/pulledover/forks","keys_url":"https://api.github.com/repos/RDelorier/pulledover/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RDelorier/pulledover/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RDelorier/pulledover/teams","hooks_url":"https://api.github.com/repos/RDelorier/pulledover/hooks","issue_events_url":"https://api.github.com/repos/RDelorier/pulledover/issues/events{/number}","events_url":"https://api.github.com/repos/RDelorier/pulledover/events","assignees_url":"https://api.github.com/repos/RDelorier/pulledover/assignees{/user}","branches_url":"https://api.github.com/repos/RDelorier/pulledover/branches{/branch}","tags_url":"https://api.github.com/repos/RDelorier/pulledover/tags","blobs_url":"https://api.github.com/repos/RDelorier/pulledover/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RDelorier/pulledover/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RDelorier/pulledover/git/refs{/sha}","trees_url":"https://api.github.com/repos/RDelorier/pulledover/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RDelorier/pulledover/statuses/{sha}","languages_url":"https://api.github.com/repos/RDelorier/pulledover/languages","stargazers_url":"https://api.github.com/repos/RDelorier/pulledover/stargazers","contributors_url":"https://api.github.com/repos/RDelorier/pulledover/contributors","subscribers_url":"https://api.github.com/repos/RDelorier/pulledover/subscribers","subscription_url":"https://api.github.com/repos/RDelorier/pulledover/subscription","commits_url":"https://api.github.com/repos/RDelorier/pulledover/commits{/sha}","git_commits_url":"https://api.github.com/repos/RDelorier/pulledover/git/commits{/sha}","comments_url":"https://api.github.com/repos/RDelorier/pulledover/comments{/number}","issue_comment_url":"https://api.github.com/repos/RDelorier/pulledover/issues/comments{/number}","contents_url":"https://api.github.com/repos/RDelorier/pulledover/contents/{+path}","compare_url":"https://api.github.com/repos/RDelorier/pulledover/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RDelorier/pulledover/merges","archive_url":"https://api.github.com/repos/RDelorier/pulledover/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RDelorier/pulledover/downloads","issues_url":"https://api.github.com/repos/RDelorier/pulledover/issues{/number}","pulls_url":"https://api.github.com/repos/RDelorier/pulledover/pulls{/number}","milestones_url":"https://api.github.com/repos/RDelorier/pulledover/milestones{/number}","notifications_url":"https://api.github.com/repos/RDelorier/pulledover/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RDelorier/pulledover/labels{/name}","releases_url":"https://api.github.com/repos/RDelorier/pulledover/releases{/id}","deployments_url":"https://api.github.com/repos/RDelorier/pulledover/deployments","created_at":"2016-03-03T03:29:27Z","updated_at":"2016-03-23T04:40:04Z","pushed_at":"2016-03-25T21:25:29Z","git_url":"git://github.com/RDelorier/pulledover.git","ssh_url":"git@github.com:RDelorier/pulledover.git","clone_url":"https://github.com/RDelorier/pulledover.git","svn_url":"https://github.com/RDelorier/pulledover","homepage":"http://pulledover.us/","size":3290,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"6ff2cb2d9156c96287c1145a610717db1be3e115","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":39700087,"name":"pulledover","full_name":"mattstauffer/pulledover","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/pulledover","description":"Pulled Over App","fork":false,"url":"https://api.github.com/repos/mattstauffer/pulledover","forks_url":"https://api.github.com/repos/mattstauffer/pulledover/forks","keys_url":"https://api.github.com/repos/mattstauffer/pulledover/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattstauffer/pulledover/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattstauffer/pulledover/teams","hooks_url":"https://api.github.com/repos/mattstauffer/pulledover/hooks","issue_events_url":"https://api.github.com/repos/mattstauffer/pulledover/issues/events{/number}","events_url":"https://api.github.com/repos/mattstauffer/pulledover/events","assignees_url":"https://api.github.com/repos/mattstauffer/pulledover/assignees{/user}","branches_url":"https://api.github.com/repos/mattstauffer/pulledover/branches{/branch}","tags_url":"https://api.github.com/repos/mattstauffer/pulledover/tags","blobs_url":"https://api.github.com/repos/mattstauffer/pulledover/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattstauffer/pulledover/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattstauffer/pulledover/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattstauffer/pulledover/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattstauffer/pulledover/statuses/{sha}","languages_url":"https://api.github.com/repos/mattstauffer/pulledover/languages","stargazers_url":"https://api.github.com/repos/mattstauffer/pulledover/stargazers","contributors_url":"https://api.github.com/repos/mattstauffer/pulledover/contributors","subscribers_url":"https://api.github.com/repos/mattstauffer/pulledover/subscribers","subscription_url":"https://api.github.com/repos/mattstauffer/pulledover/subscription","commits_url":"https://api.github.com/repos/mattstauffer/pulledover/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattstauffer/pulledover/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattstauffer/pulledover/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattstauffer/pulledover/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattstauffer/pulledover/contents/{+path}","compare_url":"https://api.github.com/repos/mattstauffer/pulledover/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattstauffer/pulledover/merges","archive_url":"https://api.github.com/repos/mattstauffer/pulledover/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattstauffer/pulledover/downloads","issues_url":"https://api.github.com/repos/mattstauffer/pulledover/issues{/number}","pulls_url":"https://api.github.com/repos/mattstauffer/pulledover/pulls{/number}","milestones_url":"https://api.github.com/repos/mattstauffer/pulledover/milestones{/number}","notifications_url":"https://api.github.com/repos/mattstauffer/pulledover/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattstauffer/pulledover/labels{/name}","releases_url":"https://api.github.com/repos/mattstauffer/pulledover/releases{/id}","deployments_url":"https://api.github.com/repos/mattstauffer/pulledover/deployments","created_at":"2015-07-25T19:30:56Z","updated_at":"2016-03-22T15:34:46Z","pushed_at":"2016-03-25T22:15:26Z","git_url":"git://github.com/mattstauffer/pulledover.git","ssh_url":"git@github.com:mattstauffer/pulledover.git","clone_url":"https://github.com/mattstauffer/pulledover.git","svn_url":"https://github.com/mattstauffer/pulledover","homepage":"http://pulledover.us/","size":3266,"stargazers_count":43,"watchers_count":43,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":7,"forks":9,"open_issues":7,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/30"},"html":{"href":"https://github.com/mattstauffer/pulledover/pull/30"},"issue":{"href":"https://api.github.com/repos/mattstauffer/pulledover/issues/30"},"comments":{"href":"https://api.github.com/repos/mattstauffer/pulledover/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/mattstauffer/pulledover/statuses/5d383bbd7192ce951fecbc50b2017fe018471eb4"}}}}