({
to,
text,
html,
...props
}: Options & TemplateType & { text: Function; html: Function })
| 15 | |
| 16 | export default class NotificationMailer { |
| 17 | static async send({ |
| 18 | to, |
| 19 | text, |
| 20 | html, |
| 21 | ...props |
| 22 | }: Options & TemplateType & { text: Function; html: Function }) { |
| 23 | const joinedAuthors = props.authors?.join(' and '); |
| 24 | return ApplicationMailer.send({ |
| 25 | to, |
| 26 | subject: `[Linen] New messages from ${joinedAuthors}`, |
| 27 | text: text(props), |
| 28 | html: html(props), |
| 29 | }); |
| 30 | } |
| 31 | |
| 32 | static async sendMention(props: Options & TemplateType) { |
| 33 | return NotificationMailer.send({ ...props, ...mentionsTemplate }); |
no test coverage detected