0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Updated countString formatting in members-count-cache

refs https://github.com/TryGhost/Team/issues/1538
This commit is contained in:
Simon Backx 2022-04-21 16:42:56 +02:00 committed by Matt Hanley
parent 0b45de28be
commit 384c461484

View file

@ -26,7 +26,7 @@ export default class MembersCountCacheService extends Service {
async countString(filter = '', {knownCount} = {}) {
const user = this.session.user;
const basicFilter = filter.replace(/^subscribed:true\+\((.*)\)$/, '$1');
const basicFilter = filter.replace(/^newsletters\.status:active\+\((.*)\)$/, '$1');
const filterParts = basicFilter.split(',');
const isFree = filterParts.length === 1 && filterParts[0] === 'status:free';
const isPaid = filterParts.length === 1 && filterParts[0] === 'status:-free';