{"action":"created","comment":{"url":"https://api.github.com/repos/john/drive.vote/pulls/comments/229466791","pull_request_review_id":169975922,"id":229466791,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTQ2Njc5MQ==","diff_hunk":"@@ -226,6 +226,21 @@ def user_language\n     user.language == 'unknown' ? 'en' : user.language\n   end\n \n+  # This confirms them immediately, then sends a text so they can talk to someone if they need to\n+  def send_confirmation\n+    ActiveRecord::Base.transaction do\n+      ride.update_attributes(status: :waiting_assignment) if ride.status == 'scheduled'\n+      update_attributes(ride_confirmed: true)\n+      \n+      body = I18n.t(:auto_confirmed_wait_for_driver, locale: user_language, time: ride.pickup_in_time_zone.strftime('%l:%M %P'))\n+      \n+      sms = Conversation.send_staff_sms(ride_zone, user, body, Rails.configuration.twilio_timeout)\n+    end\n+    return 'no_response_auto_confirm' # how is this used? Change to scheduled_ride_auto_confirm and then handle that, if it make sense.\n+    return 'scheduled_ride_auto_confirm'","path":"app/models/conversation.rb","position":15,"original_position":15,"commit_id":"950b7676ff4269c64efad4ab195c527b84874a26","original_commit_id":"950b7676ff4269c64efad4ab195c527b84874a26","user":{"login":"john","id":1668,"node_id":"MDQ6VXNlcjE2Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/1668?v=4","gravatar_id":"","url":"https://api.github.com/users/john","html_url":"https://github.com/john","followers_url":"https://api.github.com/users/john/followers","following_url":"https://api.github.com/users/john/following{/other_user}","gists_url":"https://api.github.com/users/john/gists{/gist_id}","starred_url":"https://api.github.com/users/john/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john/subscriptions","organizations_url":"https://api.github.com/users/john/orgs","repos_url":"https://api.github.com/users/john/repos","events_url":"https://api.github.com/users/john/events{/privacy}","received_events_url":"https://api.github.com/users/john/received_events","type":"User","site_admin":false},"body":"correct :-)","created_at":"2018-10-30T20:09:13Z","updated_at":"2018-10-30T20:09:13Z","html_url":"https://github.com/john/drive.vote/pull/1078#discussion_r229466791","pull_request_url":"https://api.github.com/repos/john/drive.vote/pulls/1078","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/john/drive.vote/pulls/comments/229466791"},"html":{"href":"https://github.com/john/drive.vote/pull/1078#discussion_r229466791"},"pull_request":{"href":"https://api.github.com/repos/john/drive.vote/pulls/1078"}},"in_reply_to_id":229435100},"pull_request":{"url":"https://api.github.com/repos/john/drive.vote/pulls/1078","id":226822439,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2ODIyNDM5","html_url":"https://github.com/john/drive.vote/pull/1078","diff_url":"https://github.com/john/drive.vote/pull/1078.diff","patch_url":"https://github.com/john/drive.vote/pull/1078.patch","issue_url":"https://api.github.com/repos/john/drive.vote/issues/1078","number":1078,"state":"open","locked":false,"title":"Send confirmation for scheduled rides","user":{"login":"john","id":1668,"node_id":"MDQ6VXNlcjE2Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/1668?v=4","gravatar_id":"","url":"https://api.github.com/users/john","html_url":"https://github.com/john","followers_url":"https://api.github.com/users/john/followers","following_url":"https://api.github.com/users/john/following{/other_user}","gists_url":"https://api.github.com/users/john/gists{/gist_id}","starred_url":"https://api.github.com/users/john/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john/subscriptions","organizations_url":"https://api.github.com/users/john/orgs","repos_url":"https://api.github.com/users/john/repos","events_url":"https://api.github.com/users/john/events{/privacy}","received_events_url":"https://api.github.com/users/john/received_events","type":"User","site_admin":false},"body":"When a scheduled ride is moved into 'waiting_assignment' status by the cron/scheduled lambda it needs to send the user a notification, which this PR adds. It also fixes an issue with the messages in the conversation modal","created_at":"2018-10-30T07:54:09Z","updated_at":"2018-10-30T20:09:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c406af93ef784040ac275252a595d1b131a052ad","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dryan","id":15066,"node_id":"MDQ6VXNlcjE1MDY2","avatar_url":"https://avatars0.githubusercontent.com/u/15066?v=4","gravatar_id":"","url":"https://api.github.com/users/dryan","html_url":"https://github.com/dryan","followers_url":"https://api.github.com/users/dryan/followers","following_url":"https://api.github.com/users/dryan/following{/other_user}","gists_url":"https://api.github.com/users/dryan/gists{/gist_id}","starred_url":"https://api.github.com/users/dryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dryan/subscriptions","organizations_url":"https://api.github.com/users/dryan/orgs","repos_url":"https://api.github.com/users/dryan/repos","events_url":"https://api.github.com/users/dryan/events{/privacy}","received_events_url":"https://api.github.com/users/dryan/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/john/drive.vote/pulls/1078/commits","review_comments_url":"https://api.github.com/repos/john/drive.vote/pulls/1078/comments","review_comment_url":"https://api.github.com/repos/john/drive.vote/pulls/comments{/number}","comments_url":"https://api.github.com/repos/john/drive.vote/issues/1078/comments","statuses_url":"https://api.github.com/repos/john/drive.vote/statuses/950b7676ff4269c64efad4ab195c527b84874a26","head":{"label":"john:scheduled_ride_confirmation","ref":"scheduled_ride_confirmation","sha":"950b7676ff4269c64efad4ab195c527b84874a26","user":{"login":"john","id":1668,"node_id":"MDQ6VXNlcjE2Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/1668?v=4","gravatar_id":"","url":"https://api.github.com/users/john","html_url":"https://github.com/john","followers_url":"https://api.github.com/users/john/followers","following_url":"https://api.github.com/users/john/following{/other_user}","gists_url":"https://api.github.com/users/john/gists{/gist_id}","starred_url":"https://api.github.com/users/john/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john/subscriptions","organizations_url":"https://api.github.com/users/john/orgs","repos_url":"https://api.github.com/users/john/repos","events_url":"https://api.github.com/users/john/events{/privacy}","received_events_url":"https://api.github.com/users/john/received_events","type":"User","site_admin":false},"repo":{"id":61700756,"node_id":"MDEwOlJlcG9zaXRvcnk2MTcwMDc1Ng==","name":"drive.vote","full_name":"john/drive.vote","private":false,"owner":{"login":"john","id":1668,"node_id":"MDQ6VXNlcjE2Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/1668?v=4","gravatar_id":"","url":"https://api.github.com/users/john","html_url":"https://github.com/john","followers_url":"https://api.github.com/users/john/followers","following_url":"https://api.github.com/users/john/following{/other_user}","gists_url":"https://api.github.com/users/john/gists{/gist_id}","starred_url":"https://api.github.com/users/john/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john/subscriptions","organizations_url":"https://api.github.com/users/john/orgs","repos_url":"https://api.github.com/users/john/repos","events_url":"https://api.github.com/users/john/events{/privacy}","received_events_url":"https://api.github.com/users/john/received_events","type":"User","site_admin":false},"html_url":"https://github.com/john/drive.vote","description":"Drive the Vote arranges free rides to the polls on election day.","fork":false,"url":"https://api.github.com/repos/john/drive.vote","forks_url":"https://api.github.com/repos/john/drive.vote/forks","keys_url":"https://api.github.com/repos/john/drive.vote/keys{/key_id}","collaborators_url":"https://api.github.com/repos/john/drive.vote/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/john/drive.vote/teams","hooks_url":"https://api.github.com/repos/john/drive.vote/hooks","issue_events_url":"https://api.github.com/repos/john/drive.vote/issues/events{/number}","events_url":"https://api.github.com/repos/john/drive.vote/events","assignees_url":"https://api.github.com/repos/john/drive.vote/assignees{/user}","branches_url":"https://api.github.com/repos/john/drive.vote/branches{/branch}","tags_url":"https://api.github.com/repos/john/drive.vote/tags","blobs_url":"https://api.github.com/repos/john/drive.vote/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/john/drive.vote/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/john/drive.vote/git/refs{/sha}","trees_url":"https://api.github.com/repos/john/drive.vote/git/trees{/sha}","statuses_url":"https://api.github.com/repos/john/drive.vote/statuses/{sha}","languages_url":"https://api.github.com/repos/john/drive.vote/languages","stargazers_url":"https://api.github.com/repos/john/drive.vote/stargazers","contributors_url":"https://api.github.com/repos/john/drive.vote/contributors","subscribers_url":"https://api.github.com/repos/john/drive.vote/subscribers","subscription_url":"https://api.github.com/repos/john/drive.vote/subscription","commits_url":"https://api.github.com/repos/john/drive.vote/commits{/sha}","git_commits_url":"https://api.github.com/repos/john/drive.vote/git/commits{/sha}","comments_url":"https://api.github.com/repos/john/drive.vote/comments{/number}","issue_comment_url":"https://api.github.com/repos/john/drive.vote/issues/comments{/number}","contents_url":"https://api.github.com/repos/john/drive.vote/contents/{+path}","compare_url":"https://api.github.com/repos/john/drive.vote/compare/{base}...{head}","merges_url":"https://api.github.com/repos/john/drive.vote/merges","archive_url":"https://api.github.com/repos/john/drive.vote/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/john/drive.vote/downloads","issues_url":"https://api.github.com/repos/john/drive.vote/issues{/number}","pulls_url":"https://api.github.com/repos/john/drive.vote/pulls{/number}","milestones_url":"https://api.github.com/repos/john/drive.vote/milestones{/number}","notifications_url":"https://api.github.com/repos/john/drive.vote/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/john/drive.vote/labels{/name}","releases_url":"https://api.github.com/repos/john/drive.vote/releases{/id}","deployments_url":"https://api.github.com/repos/john/drive.vote/deployments","created_at":"2016-06-22T08:06:04Z","updated_at":"2018-10-30T06:29:12Z","pushed_at":"2018-10-30T08:00:20Z","git_url":"git://github.com/john/drive.vote.git","ssh_url":"git@github.com:john/drive.vote.git","clone_url":"https://github.com/john/drive.vote.git","svn_url":"https://github.com/john/drive.vote","homepage":"https://www.drive.vote/","size":12226,"stargazers_count":10,"watchers_count":10,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":131,"license":null,"forks":7,"open_issues":131,"watchers":10,"default_branch":"master"}},"base":{"label":"john:master","ref":"master","sha":"00189cd5a56db0a00f1c1fdb0fc428fd580184f8","user":{"login":"john","id":1668,"node_id":"MDQ6VXNlcjE2Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/1668?v=4","gravatar_id":"","url":"https://api.github.com/users/john","html_url":"https://github.com/john","followers_url":"https://api.github.com/users/john/followers","following_url":"https://api.github.com/users/john/following{/other_user}","gists_url":"https://api.github.com/users/john/gists{/gist_id}","starred_url":"https://api.github.com/users/john/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john/subscriptions","organizations_url":"https://api.github.com/users/john/orgs","repos_url":"https://api.github.com/users/john/repos","events_url":"https://api.github.com/users/john/events{/privacy}","received_events_url":"https://api.github.com/users/john/received_events","type":"User","site_admin":false},"repo":{"id":61700756,"node_id":"MDEwOlJlcG9zaXRvcnk2MTcwMDc1Ng==","name":"drive.vote","full_name":"john/drive.vote","private":false,"owner":{"login":"john","id":1668,"node_id":"MDQ6VXNlcjE2Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/1668?v=4","gravatar_id":"","url":"https://api.github.com/users/john","html_url":"https://github.com/john","followers_url":"https://api.github.com/users/john/followers","following_url":"https://api.github.com/users/john/following{/other_user}","gists_url":"https://api.github.com/users/john/gists{/gist_id}","starred_url":"https://api.github.com/users/john/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john/subscriptions","organizations_url":"https://api.github.com/users/john/orgs","repos_url":"https://api.github.com/users/john/repos","events_url":"https://api.github.com/users/john/events{/privacy}","received_events_url":"https://api.github.com/users/john/received_events","type":"User","site_admin":false},"html_url":"https://github.com/john/drive.vote","description":"Drive the Vote arranges free rides to the polls on election day.","fork":false,"url":"https://api.github.com/repos/john/drive.vote","forks_url":"https://api.github.com/repos/john/drive.vote/forks","keys_url":"https://api.github.com/repos/john/drive.vote/keys{/key_id}","collaborators_url":"https://api.github.com/repos/john/drive.vote/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/john/drive.vote/teams","hooks_url":"https://api.github.com/repos/john/drive.vote/hooks","issue_events_url":"https://api.github.com/repos/john/drive.vote/issues/events{/number}","events_url":"https://api.github.com/repos/john/drive.vote/events","assignees_url":"https://api.github.com/repos/john/drive.vote/assignees{/user}","branches_url":"https://api.github.com/repos/john/drive.vote/branches{/branch}","tags_url":"https://api.github.com/repos/john/drive.vote/tags","blobs_url":"https://api.github.com/repos/john/drive.vote/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/john/drive.vote/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/john/drive.vote/git/refs{/sha}","trees_url":"https://api.github.com/repos/john/drive.vote/git/trees{/sha}","statuses_url":"https://api.github.com/repos/john/drive.vote/statuses/{sha}","languages_url":"https://api.github.com/repos/john/drive.vote/languages","stargazers_url":"https://api.github.com/repos/john/drive.vote/stargazers","contributors_url":"https://api.github.com/repos/john/drive.vote/contributors","subscribers_url":"https://api.github.com/repos/john/drive.vote/subscribers","subscription_url":"https://api.github.com/repos/john/drive.vote/subscription","commits_url":"https://api.github.com/repos/john/drive.vote/commits{/sha}","git_commits_url":"https://api.github.com/repos/john/drive.vote/git/commits{/sha}","comments_url":"https://api.github.com/repos/john/drive.vote/comments{/number}","issue_comment_url":"https://api.github.com/repos/john/drive.vote/issues/comments{/number}","contents_url":"https://api.github.com/repos/john/drive.vote/contents/{+path}","compare_url":"https://api.github.com/repos/john/drive.vote/compare/{base}...{head}","merges_url":"https://api.github.com/repos/john/drive.vote/merges","archive_url":"https://api.github.com/repos/john/drive.vote/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/john/drive.vote/downloads","issues_url":"https://api.github.com/repos/john/drive.vote/issues{/number}","pulls_url":"https://api.github.com/repos/john/drive.vote/pulls{/number}","milestones_url":"https://api.github.com/repos/john/drive.vote/milestones{/number}","notifications_url":"https://api.github.com/repos/john/drive.vote/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/john/drive.vote/labels{/name}","releases_url":"https://api.github.com/repos/john/drive.vote/releases{/id}","deployments_url":"https://api.github.com/repos/john/drive.vote/deployments","created_at":"2016-06-22T08:06:04Z","updated_at":"2018-10-30T06:29:12Z","pushed_at":"2018-10-30T08:00:20Z","git_url":"git://github.com/john/drive.vote.git","ssh_url":"git@github.com:john/drive.vote.git","clone_url":"https://github.com/john/drive.vote.git","svn_url":"https://github.com/john/drive.vote","homepage":"https://www.drive.vote/","size":12226,"stargazers_count":10,"watchers_count":10,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":131,"license":null,"forks":7,"open_issues":131,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/john/drive.vote/pulls/1078"},"html":{"href":"https://github.com/john/drive.vote/pull/1078"},"issue":{"href":"https://api.github.com/repos/john/drive.vote/issues/1078"},"comments":{"href":"https://api.github.com/repos/john/drive.vote/issues/1078/comments"},"review_comments":{"href":"https://api.github.com/repos/john/drive.vote/pulls/1078/comments"},"review_comment":{"href":"https://api.github.com/repos/john/drive.vote/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/john/drive.vote/pulls/1078/commits"},"statuses":{"href":"https://api.github.com/repos/john/drive.vote/statuses/950b7676ff4269c64efad4ab195c527b84874a26"}},"author_association":"OWNER"}}
{"actor":{"display_login":"john"}}