aboutsummaryrefslogtreecommitdiffstats
path: root/includes/mail
diff options
context:
space:
mode:
authorAmir Sarabadani <ladsgroup@gmail.com>2024-02-06 15:40:05 +0100
committerLadsgroup <Ladsgroup@gmail.com>2024-02-08 11:32:33 +0000
commit9dc68fb042ac27435b91cefb1dbbbc8467fc8994 (patch)
tree5c8e3a557ec7c311170d5e8f1fb7774c05831354 /includes/mail
parentc16701b8d00b2e650b606f874b4af157de89cc71 (diff)
downloadmediawikicore-9dc68fb042ac27435b91cefb1dbbbc8467fc8994.tar.gz
mediawikicore-9dc68fb042ac27435b91cefb1dbbbc8467fc8994.zip
mail: Stop sending notification email if edit is done by a bot
This reduces the mail spam making the email on page changes option much more bearable. Bug: T356984 Change-Id: Id6428ae6f128b20b482e4b03599492d49d7981c0
Diffstat (limited to 'includes/mail')
-rw-r--r--includes/mail/EmailNotification.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/mail/EmailNotification.php b/includes/mail/EmailNotification.php
index 302722139d9f..f9f1461e84b4 100644
--- a/includes/mail/EmailNotification.php
+++ b/includes/mail/EmailNotification.php
@@ -146,8 +146,11 @@ class EmailNotification {
// update wl_notificationtimestamp for watchers
$watchers = [];
- if ( $config->get( MainConfigNames::EnotifWatchlist ) ||
- $config->get( MainConfigNames::ShowUpdatedMarker )
+ if (
+ (
+ $config->get( MainConfigNames::EnotifWatchlist ) ||
+ $config->get( MainConfigNames::ShowUpdatedMarker )
+ ) && !$mwServices->getUserFactory()->newFromAuthority( $editor )->isBot()
) {
$watchers = $mwServices->getWatchedItemStore()->updateNotificationTimestamp(
$editor->getUser(),