Ghost/core/server/services
Kevin Ansfield 8d5e7ed695
🐛 Fixed unsubscribed members receiving email when a post is sent to all members (#13181)
refs https://github.com/TryGhost/Team/issues/935

The problem was incorrect operator precedence when multiple statements existed in the filter original filter when we transform it to enforce `subscribed:true` before sending.

- free only - subscribed:true+status:free - no issue
- paid only - subscribed:true+status:-free - no issue
- all - subscribed:true+status:-free,status:free - the ,status:free part is treated as a separate OR statement meaning the subscribed:true is not applied to it and free members that are unsubscribed will receive the email

- extracted the filter transform into a separate function so it can be unit tested
- updated the transform to use `()` for operator precedence, eg: `subscribed:true+(status:-free,status:free)`
- used transform function in `addEmail()` and `getEmailMemberRows()`
- fixed `sent/send` typo in error message
2021-07-26 12:47:03 +01:00
..
adapter-manager Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
auth Lazily instantiated express-session middleware 2021-07-14 17:19:53 +01:00
bulk-email Enabled removing all segmented email cards when the memberSegment is null 2021-07-08 18:34:30 +02:00
email-analytics Moved settings/cache to shared/settings-cache 2021-06-30 15:49:10 +01:00
invitations Moved i18n to shared 2021-05-04 13:03:38 +01:00
invites Moved settings/cache to shared/settings-cache 2021-06-30 15:49:10 +01:00
jobs Change to use @tryghost/logging 2021-06-15 15:59:11 +01:00
mail Moved settings/cache to shared/settings-cache 2021-06-30 15:49:10 +01:00
mega 🐛 Fixed unsubscribed members receiving email when a post is sent to all members (#13181) 2021-07-26 12:47:03 +01:00
members Replaced usage of Error with @tryghost/errors (#13161) 2021-07-19 11:46:38 +01:00
notifications Moved settings/cache to shared/settings-cache 2021-06-30 15:49:10 +01:00
permissions Removed usages of new Error & i18n in legacy code 2021-07-01 12:53:06 +01:00
public-config Moved labs utlity to shared 2021-07-08 09:05:41 +01:00
route-settings Moved route settings to new server service 2021-06-30 10:58:33 +01:00
settings Moved settings/cache to shared/settings-cache 2021-06-30 15:49:10 +01:00
themes v4.9.4 2021-07-12 18:55:16 +01:00
webhooks Added comments to all usages of lib/common/events 2021-07-07 16:02:44 +01:00
limits.js Added support for max periodic limit check 2021-05-07 18:43:47 +04:00
oembed.js Moved the OEmbed service to use our DI pattern 2021-01-15 15:35:30 +01:00
slack.js Added comments to all usages of lib/common/events 2021-07-07 16:02:44 +01:00
users.js 🔒 Added a "reset all passwords" feature (#13005) 2021-06-23 14:54:28 +02:00
xmlrpc.js Added comments to all usages of lib/common/events 2021-07-07 16:02:44 +01:00