SPIKE: Added unsubscribe flow for automations#28325
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| throw new errors.IncorrectUsageError({message: tpl(messages.incorrectKeyType)}); | ||
| } | ||
|
|
||
| const secretKey = this.settingsCache.get(`stripe_${type === 'connect' ? 'connect_' : ''}secret_key`); |
There was a problem hiding this comment.
our pre-commit hook for secrets gets tripped up here, so we might wanna look at this separately before the work in this PR goes from spike to real
EvanHahn
left a comment
There was a problem hiding this comment.
I know this is a spike, but I left a partial review.
| createMemberUnsubscribeKey(uuid) { | ||
| return crypto | ||
| .createHmac('sha256', this.getMembersValidationKey()) | ||
| .update(`${uuid}`) |
There was a problem hiding this comment.
nit: I think this can just pass the UUID.
| .update(`${uuid}`) | |
| .update(uuid) |
| }); | ||
| } | ||
|
|
||
| const run = await models.WelcomeEmailAutomationRun.findOne({id: runId}); |
There was a problem hiding this comment.
These handlers should only work on "new" automations (currently in the fake database).
There was a problem hiding this comment.
I don't think we need any changes in this file.
ref NY-1314
TK
note that this is just a spike, so i left i18n out so the diff would be smaller