-
Notifications
You must be signed in to change notification settings - Fork 167
[WIP] LG-15000: Send "please call" email for all remote idv flows #11596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
acabd87
Rename in_person_please_call user_mailer method
matthinz 20b7b22
Update GetUspsProofingResultsJob to use idv_please_call
matthinz 8f3a495
Return a Profile from Idv::Session::create_profile_from_applicant_wit…
matthinz 979f77c
Minor refactor of EnterPasswordController::init_profile
matthinz 3e492e8
Send "please call" email for non-GPO remote users
matthinz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -248,6 +248,20 @@ def account_verified(profile:) | |
| end | ||
| end | ||
|
|
||
| def idv_please_call(**) | ||
|
||
| with_user_locale(user) do | ||
| @hide_title = true | ||
|
|
||
| mail( | ||
| to: email_address.email, | ||
| subject: t('user_mailer.idv_please_call.subject', app_name: APP_NAME), | ||
| template_name: 'idv_please_call', | ||
| ) | ||
| end | ||
| end | ||
|
|
||
| alias_method :in_person_please_call, :idv_please_call | ||
|
||
|
|
||
| def in_person_completion_survey | ||
| with_user_locale(user) do | ||
| @header = t('user_mailer.in_person_completion_survey.header') | ||
|
|
@@ -373,21 +387,6 @@ def in_person_failed_fraud(enrollment:, visited_location_name: nil) | |
| end | ||
| end | ||
|
|
||
| def in_person_please_call(enrollment:, visited_location_name: nil) | ||
| with_user_locale(user) do | ||
| @presenter = Idv::InPerson::VerificationResultsEmailPresenter.new( | ||
| enrollment: enrollment, | ||
| url_options: url_options, | ||
| visited_location_name: visited_location_name, | ||
| ) | ||
| @hide_title = true | ||
| mail( | ||
| to: email_address.email, | ||
| subject: t('user_mailer.in_person_please_call.subject', app_name: APP_NAME), | ||
| ) | ||
| end | ||
| end | ||
|
|
||
| def account_rejected | ||
| with_user_locale(user) do | ||
| mail( | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a minor 50/50 state risk here--if the 50/50 state persists longer than the
deliver_laterdelay (1 hour), it's possible that an old server could pick up the job and callidv_please_call, which won't exist. However:deliver_laterworks here (i.e. that it re-calls the mailer method later on)I can remove this and do it in a separate deploy if folks want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just confirming that
deliver_laterdoes work this way: https://github.com/rails/rails/blob/17a5ae138ad032ecc372be5e509ef0d15711b22f/actionmailer/lib/action_mailer/message_delivery.rb#L151-L152There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to wrap my head around this one. Is there any danger if we discover and issue and need to revert and go from new back to old?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good callout. I hadn't considered reverting. I think this ends up looking a lot like adding a new job:
deliver_laterschedules a job that invokes a method on the mailer. If the mailer the job has when it runs does not have the method defined, it will fail.So I think this will be two PRs / deploys: