Fixed use of integration name in the email subject

refs https://github.com/TryGhost/Toolbox/issues/292

- The integraton name should be used instead of the user agent!
This commit is contained in:
Naz 2022-05-11 10:08:32 +08:00
parent e0e1ca0c78
commit 9d875e7d45
2 changed files with 6 additions and 6 deletions

View File

@ -52,7 +52,7 @@ class APIVersionCompatibilityService {
const subject = (trimmedUseAgent === 'Zapier')
? 'Attention required: One of your Zaps has failed'
: `Attention required: Your ${trimmedUseAgent} integration has failed`;
: `Attention required: Your ${integrationName} integration has failed`;
const {html, text} = await this.emailContentGenerator.getContent({
template,

View File

@ -77,7 +77,7 @@ describe('APIVersionCompatibilityService', function () {
await compatibilityService.handleMismatch({
acceptVersion: 'v4.5',
contentVersion: 'v5.1',
userAgent: 'Elaborate Fox',
userAgent: 'GhostAdminSDK/2.4.0',
requestURL: 'https://amazeballsghostsite.com/ghost/api/admin/posts/dew023d9203se4',
apiKeyValue: 'secret',
apiKeyType: 'content'
@ -141,7 +141,7 @@ describe('APIVersionCompatibilityService', function () {
await compatibilityService.handleMismatch({
acceptVersion: 'v4.5',
contentVersion: 'v5.1',
userAgent: 'Elaborate Fox',
userAgent: 'GhostAdminSDK/2.4.0',
requestURL: 'https://amazeballsghostsite.com/ghost/api/admin/posts/dew023d9203se4',
apiKeyValue: 'secret',
apiKeyType: 'content'
@ -171,7 +171,7 @@ describe('APIVersionCompatibilityService', function () {
await compatibilityService.handleMismatch({
acceptVersion: 'v4.5',
contentVersion: 'v5.1',
userAgent: 'Elaborate Fox',
userAgent: 'GhostAdminSDK/2.4.0',
requestURL: 'does not matter',
apiKeyValue: 'secret',
apiKeyType: 'content'
@ -247,7 +247,7 @@ describe('APIVersionCompatibilityService', function () {
await compatibilityService.handleMismatch({
acceptVersion: 'v4.5',
contentVersion: 'v5.1',
userAgent: 'Elaborate Fox',
userAgent: 'GhostAdminSDK/2.4.0',
requestURL: 'https://amazeballsghostsite.com/ghost/api/admin/posts/dew023d9203se4',
apiKeyValue: 'secret',
apiKeyType: 'content'
@ -298,7 +298,7 @@ describe('APIVersionCompatibilityService', function () {
await compatibilityService.handleMismatch({
acceptVersion: 'v4.8',
contentVersion: 'v5.1',
userAgent: 'Elaborate Fox',
userAgent: 'GhostAdminSDK/2.4.0',
requestURL: 'https://amazeballsghostsite.com/ghost/api/admin/posts/dew023d9203se4',
apiKeyValue: 'secret',
apiKeyType: 'content'