🐛 Fixed newsletter resending showing incorrect recipient data

closes https://github.com/TryGhost/Ghost/issues/16125

We weren't taking into account any existing email segment set on the
post. This is usually not an issue because during the publishing flow
the post.emailSegment and the selectedRecipientFilter are kept in sync,
but it becomes and issue when the email fails to send and is later
retried - we now have an inconsistency between the two values.
This commit is contained in:
Fabien 'egg' O'Carroll 2023-01-30 16:44:57 +07:00 committed by GitHub
parent 829c325e51
commit c11e79765e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,7 +168,7 @@ export default class PublishOptions {
}
get recipientFilter() {
return this.selectedRecipientFilter === undefined ? this.defaultRecipientFilter : this.selectedRecipientFilter;
return this.selectedRecipientFilter || this.post.emailSegment || this.defaultRecipientFilter;
}
get defaultRecipientFilter() {