-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(server): album's email notification #9439
Conversation
…album-update-email
…album-update-email
…album-update-email
…album-update-email
const { html, text } = this.notificationRepository.renderEmail({ | ||
template: EmailTemplate.ALBUM_UPDATE, | ||
data: { | ||
baseUrl: server.externalDomain || 'http://localhost:2283', | ||
albumId: album.id, | ||
albumName: album.albumName, | ||
recipientName: recipient.name, | ||
cid: attachement ? attachement.cid : undefined, | ||
}, | ||
}); | ||
|
||
await this.jobRepository.queue({ | ||
name: JobName.SEND_EMAIL, | ||
data: { | ||
to: recipient.email, | ||
subject: `New media have been added to an album - ${album.albumName}`, | ||
html, | ||
text, | ||
imageAttachements: attachement ? [attachement] : undefined, | ||
}, | ||
}); | ||
} |
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.
We can probably pull this out into a shared sendEmail func
Co-authored-by: bo0tzz <git@bo0tzz.me>
Co-authored-by: bo0tzz <git@bo0tzz.me>
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.
Few things to clean up, but looks pretty good otherwise. We should clean up/reuse the email templates in a future PR.
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
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.
LGTM!
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.
LGTM, just one change and sounds like we probably want to wait until we have user preferences implemented before we push this out
Co-authored-by: Zack Pollard <zackpollard@ymail.com>
This PR adds email notifications for albums when