Skip to content

Commit 976588a

Browse files
authored
Merge pull request #18302 from mozilla/inactives-second-and-final-notices
task(auth): Handle second and final account delete notifications
2 parents b9534ab + 546f175 commit 976588a

13 files changed

Lines changed: 1182 additions & 84 deletions

File tree

libs/shared/cloud-tasks/src/lib/send-email-tasks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { CloudTaskOptions } from './cloud-tasks.types';
1515
export enum EmailTypes {
1616
INACTIVE_DELETE_FIRST_NOTIFICATION = 'inactiveDeleteFirstNotification',
1717
INACTIVE_DELETE_SECOND_NOTIFICATION = 'inactiveDeleteSecondNotification',
18+
INACTIVE_DELETE_FINAL_NOTIFICATION = 'inactiveDeleteFinalNotification',
1819
}
1920
export type CloudTaskEmailType = (typeof EmailTypes)[keyof typeof EmailTypes];
2021

packages/fxa-auth-server/lib/email-cloud-tasks.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,20 @@ export class EmailCloudTaskManager {
123123
// @TODO FXA-10574, FXA-10942
124124
switch ((request.payload as SendEmailTaskPayload).emailType) {
125125
case EmailTypes.INACTIVE_DELETE_FIRST_NOTIFICATION:
126-
await this.inactiveAccountsManager.handleFirstNotificationTask(
126+
await this.inactiveAccountsManager.handleNotificationTask(
127+
'first',
128+
request.payload as SendEmailTaskPayload
129+
);
130+
break;
131+
case EmailTypes.INACTIVE_DELETE_SECOND_NOTIFICATION:
132+
await this.inactiveAccountsManager.handleNotificationTask(
133+
'second',
134+
request.payload as SendEmailTaskPayload
135+
);
136+
break;
137+
case EmailTypes.INACTIVE_DELETE_FINAL_NOTIFICATION:
138+
await this.inactiveAccountsManager.handleNotificationTask(
139+
'final',
127140
request.payload as SendEmailTaskPayload
128141
);
129142
break;

0 commit comments

Comments
 (0)