Bugfix: Don't send an email to users to edit pages on their watchlists

This commit is contained in:
Starbeamrainbowlabs 2019-12-24 12:13:35 +00:00
parent f6f562790e
commit 95e06c5b8b
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 6 additions and 0 deletions

View File

@ -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;