Commit Graph

12 Commits

Author SHA1 Message Date
Naz
521ddc001c Added request url parameter to notification emails
refs https://github.com/TryGhost/Toolbox/issues/292

- Generic version mismatch notification emails contain request url which had to be parameterized to function properly.
2022-05-05 14:51:47 +08:00
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
1a0a4272f3 Extracted template to be a separate variable
refs https://github.com/TryGhost/Toolbox/issues/292

- Nice to track the change history
2022-05-05 12:32:52 +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
06c733bb0b Added explicit "text" parameter in sendEmail call
refs https://github.com/TryGhost/Toolbox/issues/292

- This is groundwork before adding separate html/text generation. Should make future additions more readable
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
f21a403538 Fixed incompatibility subject line
refs https://github.com/TryGhost/Toolbox/issues/292

- This is the subject line with the latest proposed copy
2022-04-21 16:01:56 +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
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
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