From 63c18050af0a5102e166bba70f51b03fb43f4a2b Mon Sep 17 00:00:00 2001 From: CosmicAlpha Date: Tue, 13 Feb 2024 13:20:14 -0700 Subject: [PATCH] Fix comment notifications --- includes/ImportDumpRequestManager.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/ImportDumpRequestManager.php b/includes/ImportDumpRequestManager.php index abafb055d..90607eceb 100644 --- a/includes/ImportDumpRequestManager.php +++ b/includes/ImportDumpRequestManager.php @@ -27,9 +27,8 @@ class ImportDumpRequestManager { - private const SYSTEM_USERS = [ + private const IGNORED_USERS = [ 'ImportDump Extension', - 'ImportDump Status Update', ]; public const CONSTRUCTOR_OPTIONS = [ @@ -163,7 +162,7 @@ public function addComment( string $comment, User $user ) { if ( ExtensionRegistry::getInstance()->isLoaded( 'Echo' ) && - !in_array( $user->getName(), self::SYSTEM_USERS ) + !in_array( $user->getName(), self::IGNORED_USERS ) ) { $this->sendNotification( $comment, 'importdump-request-comment', $user ); } @@ -263,7 +262,7 @@ public function getComments(): array { * @return array */ public function getInvolvedUsers(): array { - return array_unique( array_column( $this->getComments(), 'user' ) + [ $this->getRequester() ] ); + return array_unique( array_merge( array_column( $this->getComments(), 'user' ), [ $this->getRequester() ] ) ); } /**