Skip to content

Commit aa4b767

Browse files
Filter out Foundation newsletters (mozilla#16832)
These have been deleted from Basket, but we currently allow existing subscribers to see inactive newsletters if they are still subscribed. The Foundation newsletters are now active in a different system so we don't want to display them in the pref center. There is copy to indicate where users may unsubscribe from Foundation newsletters.
1 parent 20274c0 commit aa4b767

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

‎media/js/newsletter/management.es6.js‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ import FormUtils from './form-utils.es6';
88

99
const FXA_NEWSLETTERS = ['firefox-accounts-journey', 'test-pilot'];
1010

11+
const FOUNDATION_NEWSLETTERS = [
12+
'mozilla-foundation',
13+
'take-action-for-the-internet',
14+
'mozilla-festival',
15+
'internet-health-report',
16+
'common-voice',
17+
'mozilla-fellowship-awardee-alumni'
18+
];
19+
1120
const FXA_NEWSLETTERS_LOCALES = ['en', 'de', 'fr'];
1221

1322
const UNSUB_UNSUBSCRIBED_ALL = 1;
@@ -220,7 +229,11 @@ const NewsletterManagementForm = {
220229
NewsletterManagementForm.isFxANewsletter(newsletter) &&
221230
isFxALocale);
222231

223-
if (!shouldDisplayNewsletter) {
232+
// Temporary filter for Foundation newsletters, they are handled in separate system
233+
if (
234+
!shouldDisplayNewsletter ||
235+
FOUNDATION_NEWSLETTERS.includes(obj.slug)
236+
) {
224237
continue;
225238
}
226239

0 commit comments

Comments
 (0)