From 3a85a3380f7073486a0a2e98d8263b49239f7b6e Mon Sep 17 00:00:00 2001 From: lens0021 Date: Sun, 22 Sep 2024 00:14:58 +0900 Subject: [PATCH] Fix checking blocker instead of target --- includes/HookHandlers/SpamEmail.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/HookHandlers/SpamEmail.php b/includes/HookHandlers/SpamEmail.php index d4a8dbc..ca13dc2 100644 --- a/includes/HookHandlers/SpamEmail.php +++ b/includes/HookHandlers/SpamEmail.php @@ -69,9 +69,9 @@ static function ( $block ) { if ( wfTimestampNow() > $block->getExpiry() ) { return null; } - $id = $block->getBlocker(); - if ( $id ) { - return User::newFromIdentity( $id )->getEmail(); + $target = User::newFromIdentity( $block->getTargetUserIdentity() ); + if ( $target ) { + return $target->getEmail(); } return null; },