0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Moved unsubscribing members behind feature flag

refs https://github.com/TryGhost/Team/issues/2367

We're not releasing this immediately so need to put it behind the flag
so that we continue to send emails to the correct members.
This commit is contained in:
Fabien "egg" O'Carroll 2022-12-09 10:30:44 +07:00
parent d62f09c588
commit adae605555

View file

@ -351,6 +351,9 @@ module.exports = function MembersAPI({
bus.emit('ready'); bus.emit('ready');
DomainEvents.subscribe(EmailSuppressedEvent, async function (event) { DomainEvents.subscribe(EmailSuppressedEvent, async function (event) {
if (!labsService.isSet('suppressionList')) {
return;
}
const member = await memberRepository.get({email: event.data.emailAddress}); const member = await memberRepository.get({email: event.data.emailAddress});
if (!member) { if (!member) {
return; return;