From 488e35d82e51b924bb315c556bf12e6605d16dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Sat, 11 May 2024 15:40:50 +0200 Subject: [PATCH] Use ConditionalUserOptions for "echo-subscriptions-email-dt-subscription" WMF config change should be deployed first: Iaff2d5ffee78d6200e1fa971c5c62137a400005d Bug: T357221 Change-Id: I2744d52c5ff8c89166c19ab0ff2b4a27bfbf7cd7 --- extension.json | 8 ++++++++ includes/Hooks/PreferenceHooks.php | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/extension.json b/extension.json index 441f8fcfb..ce6d94302 100644 --- a/extension.json +++ b/extension.json @@ -521,6 +521,14 @@ "discussiontools-autotopicsub": 1, "discussiontools-visualenhancements": 1 }, + "ConditionalUserOptions": { + "echo-subscriptions-email-dt-subscription": [ + [ + true, + [ "registered-after", "20240617000000" ] + ] + ] + }, "config": { "DiscussionToolsBeta": { "value": false, diff --git a/includes/Hooks/PreferenceHooks.php b/includes/Hooks/PreferenceHooks.php index 2e1a66e4a..52faabd8b 100644 --- a/includes/Hooks/PreferenceHooks.php +++ b/includes/Hooks/PreferenceHooks.php @@ -221,8 +221,6 @@ class PreferenceHooks implements } $userOptionsManager = MediaWikiServices::getInstance()->getUserOptionsManager(); - // We want new users to be created with email-subscriptions to our notifications enabled - $userOptionsManager->setOption( $user, 'echo-subscriptions-email-dt-subscription', true ); // The auto topic subscription feature is disabled by default for existing users, but // we enable it for new users (T294398). // This can only occur when the feature is available for everyone; when it's in beta,