{"action":"created","comment":{"url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/comments/70127234","id":70127234,"diff_hunk":"@@ -0,0 +1,77 @@\n+<?php\n+\n+namespace App\\Http\\Controllers;\n+\n+use App\\Http\\Requests\\TwilioRequest as Request;\n+\n+class IncomingTextController extends Controller\n+{\n+    protected $commands = [\n+        \"unsubscribe\" => [","path":"app/Http/Controllers/IncomingTextController.php","position":10,"original_position":10,"commit_id":"7d4bb8d532b0a94d8ffed1d31ce5f537292fa090","original_commit_id":"7d4bb8d532b0a94d8ffed1d31ce5f537292fa090","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":"Twilio handles the blacklisting automatically and then they send the message through so that we can act on it, I didn't see any specific webhook setup but the link in the pr explains how it works.","created_at":"2016-07-08T19:21:07Z","updated_at":"2016-07-08T19:21:07Z","html_url":"https://github.com/mattstauffer/pulledover/pull/31#discussion_r70127234","pull_request_url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/comments/70127234"},"html":{"href":"https://github.com/mattstauffer/pulledover/pull/31#discussion_r70127234"},"pull_request":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/31","id":74345012,"html_url":"https://github.com/mattstauffer/pulledover/pull/31","diff_url":"https://github.com/mattstauffer/pulledover/pull/31.diff","patch_url":"https://github.com/mattstauffer/pulledover/pull/31.patch","issue_url":"https://api.github.com/repos/mattstauffer/pulledover/issues/31","number":31,"state":"open","locked":false,"title":"Handle customer stop","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 texts your twilio number with one of the messages described [here](https://www.twilio.com/help/faq/sms/does-twilio-support-stop-block-and-cancel-aka-sms-filtering) they will be added or removed from the blacklist. This pull-request intends to prevent any text from being sent to blacklisted numbers.\r\n\r\n#### Incoming Text Messages\r\nWhen someone sends one of the magic words to the app twilio will send that message through so that we can act on it. Below is the list of actions that are performed based on the body of the text message received.\r\n- Subscribe [\"START\", \"YES\"]\r\n   - Marks the number/friend as NOT blacklisted\r\n- Unsubscribe [\"STOP\", \"STOPALL\", \"UNSUBSCRIBE\", \"CANCEL\", \"END\", \"QUIT\"]\r\n   - Marks the number/friend as blacklisted\r\n\r\n***This required that you set up your twilio number to direct incoming text messages to {url}/receive-text***\r\n\r\nThe receiveText action uses the TwilioRequest which verifies that the request is coming from twilio by checking the signature header against the twilio api token set in your .env file. This is disabled on the local environment so you can use your rest client to send incoming texts.\r\n\r\n#### Outgoing Text Messages\r\nBlacklisted numbers are excluded when sending text messages. If a text is sent that causes a BlacklistedPhoneNumberException then the number/friend will be marked as blacklisted. This can happen while sending verification texts as well as new recording notifications.\r\n\r\n#### Displaying blacklisted numbers\r\nPhone numbers have an appended attribute called \"status\" which will be one of three values\r\n- blacklisted\r\n- verified\r\n- unverified\r\n\r\nThese are determined in the order above, so if a verified number is blacklisted then its status will show blacklisted and not verified.\r\n\r\ncloses #26 ","created_at":"2016-06-18T19:12:03Z","updated_at":"2016-07-08T19:21:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ebc2c383d3d4e1d3324daf43abf06a5cb918df34","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/31/commits","review_comments_url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/31/comments","review_comment_url":"https://api.github.com/repos/mattstauffer/pulledover/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mattstauffer/pulledover/issues/31/comments","statuses_url":"https://api.github.com/repos/mattstauffer/pulledover/statuses/7d4bb8d532b0a94d8ffed1d31ce5f537292fa090","head":{"label":"RDelorier:handle-customer-STOP","ref":"handle-customer-STOP","sha":"7d4bb8d532b0a94d8ffed1d31ce5f537292fa090","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-07-06T23:01:23Z","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":3486,"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:handle-customer-STOP","ref":"handle-customer-STOP","sha":"87c6567c6720d8ca4bdfd639f9b4a92baa9fc0fb","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-07-08T02:35:03Z","pushed_at":"2016-07-08T12:44:11Z","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":3355,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":7,"forks":14,"open_issues":7,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/31"},"html":{"href":"https://github.com/mattstauffer/pulledover/pull/31"},"issue":{"href":"https://api.github.com/repos/mattstauffer/pulledover/issues/31"},"comments":{"href":"https://api.github.com/repos/mattstauffer/pulledover/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mattstauffer/pulledover/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/mattstauffer/pulledover/statuses/7d4bb8d532b0a94d8ffed1d31ce5f537292fa090"}}}}
{"actor":{"display_login":"RDelorier"}}