feat: add email for recruiter rejected candidate match#3273
Conversation
|
🍹 The Update (preview) for dailydotdev/api/prod (at 93bceb7) was successful. Resource Changes Name Type Operation
~ vpc-native-clean-zombie-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-current-streak-cron kubernetes:batch/v1:CronJob update
~ vpc-native-deployment kubernetes:apps/v1:Deployment update
+ api-sub-api.recruiter-rejected-candidate-match-email gcp:pubsub/subscription:Subscription create
~ vpc-native-update-source-tag-view-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tag-recommendations-cron kubernetes:batch/v1:CronJob update
~ vpc-native-hourly-notification-cron kubernetes:batch/v1:CronJob update
~ vpc-native-validate-active-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generic-referral-reminder-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generate-search-invites-cron kubernetes:batch/v1:CronJob update
~ vpc-native-private-deployment kubernetes:apps/v1:Deployment update
- vpc-native-api-clickhouse-migration-fd893ba9 kubernetes:batch/v1:Job delete
+ vpc-native-api-db-migration-7dad72d8 kubernetes:batch/v1:Job create
~ vpc-native-update-trending-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-images-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-sync-subscription-with-cio-cron kubernetes:batch/v1:CronJob update
~ vpc-native-post-analytics-history-day-clickhouse-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-clickhouse-migration-7dad72d8 kubernetes:batch/v1:Job create
~ vpc-native-bg-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-ws-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
- vpc-native-api-db-migration-fd893ba9 kubernetes:batch/v1:Job delete
~ vpc-native-check-analytics-report-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-stale-user-transactions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-gifted-plus-cron kubernetes:batch/v1:CronJob update
~ vpc-native-post-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-daily-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-public-threshold-cron kubernetes:batch/v1:CronJob update
~ vpc-native-temporal-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-update-highlighted-views-cron kubernetes:batch/v1:CronJob update
|
|
|
||
| expect(args.message_data).toEqual({ | ||
| title: `It's a match!`, | ||
| title: `[Action Required] It's a match!`, |
There was a problem hiding this comment.
This should not be here?
There was a problem hiding this comment.
i pushed a change to main earlier, didn't notice we test for the title. i actually looked for it but missed this place. so i'm fixing it here
| updatedAt: getSecondsTimestamp(data.updatedAt), | ||
| }); | ||
|
|
||
| await triggerTypedEvent( |
There was a problem hiding this comment.
Think this could be here?
| await triggerTypedEvent( | |
| await triggerTypedEvent<'topicnamehere'>( |
There was a problem hiding this comment.
nope it's not needed. it's automatically infer the type from the topic name provided as argument
There was a problem hiding this comment.
Ah ok maybe just the notification one that prefers it
| await sendEmail({ | ||
| ...baseNotificationEmailData, | ||
| reply_to: 'ido@daily.dev', | ||
| transactional_message_id: '85', | ||
| message_data: { | ||
| opportunity_id: opportunityId, | ||
| }, | ||
| identifiers: { | ||
| id: user.id, | ||
| }, | ||
| to: user.email, | ||
| }); |
There was a problem hiding this comment.
Why do you use this direct one and not the notification worker way?
There was a problem hiding this comment.
because we don't trigger an actual notification. just email this was my understanding
There was a problem hiding this comment.
with a notification we can't ask for feedback
There was a problem hiding this comment.
Yes but you just null the notification? isn't it better to uniform instead of duplicate?
There was a problem hiding this comment.
Ah thinks you're right I thought we could individually turn off
- push
- realtime
But guess we only added that to email, we should maybe do that?
Envision in future we probably have more singular endpoints..
For now this is fine then. (just hate duplication of this function)
There was a problem hiding this comment.
i'll try to find a way to streamline it, out of this PR
No description provided.