From 95e06c5b8b7f88d619fb09b3032908ccc5555f36 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 24 Dec 2019 12:13:35 +0000 Subject: [PATCH] Bugfix: Don't send an email to users to edit pages on their watchlists --- modules/feature-watchlist.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/feature-watchlist.php b/modules/feature-watchlist.php index 653470e..9c30e96 100644 --- a/modules/feature-watchlist.php +++ b/modules/feature-watchlist.php @@ -225,9 +225,15 @@ register_module([ $usernames = []; foreach($settings->users as $username => $user_data) { + // Skip if this is the user that made the edit + if($username == $env->user) + continue; + + // If the user's watchlist is empty, then there's no point in checking it if(empty($user_data->watchlist)) continue; + // If it's not in the watchlist, then we shouldn't send an email if(!in_array($env->page, $user_data->watchlist)) continue;