Fixed incorrect notification wording for scheduled email-only posts

refs https://github.com/TryGhost/Team/issues/1169

- we were incorrectly saying "Will be published and sent" instead of "Will be sent" for scheduled email-only posts
This commit is contained in:
Kevin Ansfield 2021-12-07 09:37:49 +00:00
parent cbf7e1a740
commit 93002be21d
2 changed files with 9 additions and 4 deletions

View File

@ -3,6 +3,11 @@
Saving...
{{else if @post.isSent}}
Sent to {{gh-pluralize @post.email.emailCount "member"}}
{{else if (and @post.emailOnly @post.isScheduled)}}
<time datetime="{{@post.publishedAtUTC}}" class="ml1 green f8" data-test-schedule-countdown>
Will be sent to <GhRecipientFilterCount @filter={{@post.emailRecipientFilter}} />
{{this.scheduledTime}}
</time>
{{else if (or @post.isPublished @post.pastScheduledTime)}}
Published
{{#if (or (eq @post.email.status "submitting") (eq @post.email.status "submitting"))}}

View File

@ -1028,20 +1028,20 @@ export default Controller.extend({
let {
publishedAtUTC,
emailRecipientFilter,
previewUrl
previewUrl,
emailOnly
} = this.post;
let publishedAtBlogTZ = moment.tz(publishedAtUTC, this.settings.get('timezone'));
let title = 'Scheduled';
let description = ['Will be published'];
let description = emailOnly ? ['Will be sent'] : ['Will be published'];
if (emailRecipientFilter && emailRecipientFilter !== 'none') {
const recipientCount = await this.membersCountCache.countString(`subscribed:true+(${emailRecipientFilter})`);
description.push(`and delivered to <span><strong>${recipientCount}</strong></span>`);
description.push(`${!emailOnly ? 'and delivered ' : ''}to <span><strong>${recipientCount}</strong></span>`);
}
description.push(`on <span><strong>${publishedAtBlogTZ.format('MMM Do')}</strong></span>`);
description.push(`at <span><strong>${publishedAtBlogTZ.format('HH:mm')}</strong>`);
if (publishedAtBlogTZ.utcOffset() === 0) {
description.push('(UTC)</span>');