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:
parent
d62f09c588
commit
adae605555
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue