From c11e79765ed8db964e8127c486a128e34cf53c63 Mon Sep 17 00:00:00 2001 From: Fabien 'egg' O'Carroll Date: Mon, 30 Jan 2023 16:44:57 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20newsletter=20resending?= =?UTF-8?q?=20showing=20incorrect=20recipient=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- ghost/admin/app/utils/publish-options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/admin/app/utils/publish-options.js b/ghost/admin/app/utils/publish-options.js index 208eb5fe80..e1ea9730a4 100644 --- a/ghost/admin/app/utils/publish-options.js +++ b/ghost/admin/app/utils/publish-options.js @@ -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() {