🐛 Fixed incorrect newsletter subscriber count on dashboard (#17683)

fixes https://github.com/TryGhost/Product/issues/3714

The dashboard was showing the total number of subscribers, but not
taking into account members who have disabled emails. This commit fixes
that.
This commit is contained in:
Michael Barrett 2023-08-10 18:18:12 +01:00 committed by GitHub
parent f983e93090
commit 733135d3ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -693,8 +693,8 @@ export default class DashboardStatsService extends Service {
}
const [paid, free] = yield Promise.all([
this.membersCountCache.count('newsletters.status:active+status:-free'),
this.membersCountCache.count('newsletters.status:active+status:free')
this.membersCountCache.count('newsletters.status:active+status:-free+email_disabled:0'),
this.membersCountCache.count('newsletters.status:active+status:free+email_disabled:0')
]);
this.newsletterSubscribers = {