Commit Graph

11 Commits

Author SHA1 Message Date
Naz
b2f585e0d0 Added Zapier-specific email templates
refs https://github.com/TryGhost/Toolbox/issues/292

- When the handler recognizes a Zapier client it should send an email using Zapier-specific template with instructions more suitable for Zap failure
2022-05-05 12:43:55 +08:00
Naz
6aeb27ce62 Renamed zapier test variables
refs https://github.com/TryGhost/Toolbox/issues/292

- Before adding Zapier specific feature cleaning up here for cleaner history
2022-05-05 12:24:32 +08:00
Naz
30f8b0a446 Added support for html templates in version emails
refs https://github.com/TryGhost/Toolbox/issues/292

- The html/text emails is a desired system that's used in Ghost core and should be reused with version mismatch notification emails too.
- Currently there's only one template defined "generic-mismatch" and the original file for it can be found under /templates/generic-mismatch.html
- If we need to distinguish user agents we can addd more templates to the `/templates/` folder
2022-05-05 12:17:30 +08:00
Naz
ff4bdb5ff8 Made integration naming less technical
refs https://github.com/TryGhost/Toolbox/issues/292

- The audience of the notification emails for version missmatch could be less technical - site owneres are usually creators not programmers. Not using complex technical details in the email subject/body should make the incompatibility more approachable to deal with.
2022-05-04 11:05:48 +08:00
Naz
8414e927f9 Added handling of multiple owners to notify
refs https://github.com/TryGhost/Toolbox/issues/292

- There can be multiple users in the Ghost instance that should be notifiied about version mismatch. Following the logic of the security notifications these are users with 'Owner' and 'Administrator' roles. To have the most up to date list of the emails to notify the emails fetching was made dinamic and is now passed in as a 'fetchEmailsToNotify' function.
- Also fixed the subject of the email to match the final copy
2022-04-21 15:57:43 +08:00
Naz
a7fccf1bf8 Fixed email sending
refs https://github.com/TryGhost/Toolbox/issues/292

- The standard sendEmail function used in Ghost accepts three non-optional parameters: to, subject, and html. Have extended the usage with these three required fields
2022-04-21 15:57:43 +08:00
Naz
188707c5bb Added previously handled checking logic
refs https://github.com/TryGhost/Toolbox/issues/292

- Added additional logic needed to check if the passed in `Accept-Version` header has been handled
2022-04-21 15:57:43 +08:00
Naz
a009616206 Removed useless code 2022-04-21 15:57:43 +08:00
Naz
a8333f22d8 Added bare bones functionality sending an email
refs https://github.com/TryGhost/Toolbox/issues/292

- Super happy path scenario which handles sending information with some basic incompatibility information
- It's meant to be built up upon! More to follow :)
2022-04-21 15:57:43 +08:00
Naz
e66ef401bd Removed boilerplate test suite 2022-04-21 15:57:43 +08:00
Naz
178856cf82 Bootstrapped api version compatibility package
refs https://github.com/TryGhost/Toolbox/issues/292

- Fresh package out of Super Slimer
2022-04-21 15:57:43 +08:00