diff --git a/extension.json b/extension.json index 72a043699..114c9efbf 100644 --- a/extension.json +++ b/extension.json @@ -545,9 +545,9 @@ "value": true, "description": "Enable the topic subscription backend. This controls whether the feature can be tried out using the query parameter, and whether the Echo events will be created. Do not enable this unless the database tables exist. Do enable it before making the 'topicsubscription' feature available." }, - "DiscussionToolsAutoTopicSubWhere": { - "value": "replynewtopic", - "description": "In what scenarios automatic topic subscriptions are added. Either 'replynewtopic' for only edits made using our reply tool and new topic tool, or 'everywhere' for every edit." + "DiscussionToolsAutoTopicSubEditor": { + "value": "discussiontoolsapi", + "description": "Editor which triggers automatic topic subscriptions. Either 'discussiontoolsapi' for edits made using DiscussionTools' API (e.g. reply and new topic tools), or 'any' for any editor." }, "DiscussionToolsTalkPageParserCacheExpiry": { "value": 0, diff --git a/includes/ApiDiscussionToolsEdit.php b/includes/ApiDiscussionToolsEdit.php index e00c60639..a7d1eb14f 100644 --- a/includes/ApiDiscussionToolsEdit.php +++ b/includes/ApiDiscussionToolsEdit.php @@ -38,7 +38,7 @@ class ApiDiscussionToolsEdit extends ApiBase { $dtConfig = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'discussiontools' ); $autoSubscribe = $dtConfig->get( 'DiscussionToolsEnableTopicSubscriptionBackend' ) && - $dtConfig->get( 'DiscussionToolsAutoTopicSubWhere' ) === 'replynewtopic' && + $dtConfig->get( 'DiscussionToolsAutoTopicSubEditor' ) === 'discussiontoolsapi' && HookUtils::shouldAddAutoSubscription( $this->getUser(), $title ); $subscribableHeadingName = null; $subscribableSectionTitle = ''; diff --git a/includes/Notifications/EventDispatcher.php b/includes/Notifications/EventDispatcher.php index e70a6ca35..f354496c1 100644 --- a/includes/Notifications/EventDispatcher.php +++ b/includes/Notifications/EventDispatcher.php @@ -298,7 +298,7 @@ class EventDispatcher { if ( $dtConfig->get( 'DiscussionToolsEnableTopicSubscriptionBackend' ) && - $dtConfig->get( 'DiscussionToolsAutoTopicSubWhere' ) === 'everywhere' && + $dtConfig->get( 'DiscussionToolsAutoTopicSubEditor' ) === 'any' && HookUtils::shouldAddAutoSubscription( $user, $title ) ) { $subscriptionStore = MediaWikiServices::getInstance()->getService( 'DiscussionTools.SubscriptionStore' );