From c747d5010fb980b21835b74d04b7d106311bb37a Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Thu, 29 Oct 2026 12:29:50 +0000 Subject: [PATCH] Send plugin review emails to the Marketplace mailbox too New review submissions and developer replies to review messages were only emailed to support@. They now go to marketplace@ as well, set by a new mail.marketplace_address config key (MAIL_MARKETPLACE_ADDRESS). Co-Authored-By: Claude Opus 5.5 --- app/Livewire/Customer/Plugins/Show.php | 2 +- app/Models/Plugin.php | 2 +- config/mail.php | 13 +++++++++++++ tests/Feature/CustomerPluginReviewChecksTest.php | 2 +- .../Livewire/Customer/PluginMessagesTest.php | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/Livewire/Customer/Plugins/Show.php b/app/Livewire/Customer/Plugins/Show.php index 587b3b7be..f9de3970c 100644 --- a/app/Livewire/Customer/Plugins/Show.php +++ b/app/Livewire/Customer/Plugins/Show.php @@ -221,7 +221,7 @@ public function submitForReview(): void // Notify $user->notify(new PluginSubmitted($this->plugin)); - Notification::route('mail', config('mail.support_address')) + Notification::route('mail', [config('mail.support_address'), config('mail.marketplace_address')]) ->notify(new PluginPendingReview($this->plugin)); Flux::toast(variant: 'success', text: 'Your plugin has been submitted for review!'); diff --git a/app/Models/Plugin.php b/app/Models/Plugin.php index 585758be3..598cb0330 100644 --- a/app/Models/Plugin.php +++ b/app/Models/Plugin.php @@ -1116,7 +1116,7 @@ public function messageAdmins(string $message, ?int $causerId = null): PluginAct 'causer_id' => $causerId ?? $this->user_id, ]); - Notification::route('mail', config('mail.support_address')) + Notification::route('mail', [config('mail.support_address'), config('mail.marketplace_address')]) ->notify(new PluginDeveloperReplied($this, $activity)); return $activity; diff --git a/config/mail.php b/config/mail.php index d8984256d..6cf3cdc76 100644 --- a/config/mail.php +++ b/config/mail.php @@ -116,6 +116,19 @@ 'support_address' => env('MAIL_SUPPORT_ADDRESS', 'support@nativephp.com'), + /* + |-------------------------------------------------------------------------- + | Marketplace Address + |-------------------------------------------------------------------------- + | + | The mailbox for the Marketplace team. Plugin review submissions and + | developer replies to review messages are sent here as well as to the + | support address. + | + */ + + 'marketplace_address' => env('MAIL_MARKETPLACE_ADDRESS', 'marketplace@nativephp.com'), + /* |-------------------------------------------------------------------------- | Markdown Mail Settings diff --git a/tests/Feature/CustomerPluginReviewChecksTest.php b/tests/Feature/CustomerPluginReviewChecksTest.php index 4801bf15e..2a17a3e14 100644 --- a/tests/Feature/CustomerPluginReviewChecksTest.php +++ b/tests/Feature/CustomerPluginReviewChecksTest.php @@ -141,7 +141,7 @@ public function submitting_a_plugin_for_review_runs_review_checks(): void Notification::assertSentOnDemand( PluginPendingReview::class, function (PluginPendingReview $notification, array $channels, object $notifiable) use ($plugin) { - return $notifiable->routes['mail'] === 'support@nativephp.com' + return $notifiable->routes['mail'] === ['support@nativephp.com', 'marketplace@nativephp.com'] && $notification->plugin->id === $plugin->id; } ); diff --git a/tests/Feature/Livewire/Customer/PluginMessagesTest.php b/tests/Feature/Livewire/Customer/PluginMessagesTest.php index 66be084a6..69ac9f98a 100644 --- a/tests/Feature/Livewire/Customer/PluginMessagesTest.php +++ b/tests/Feature/Livewire/Customer/PluginMessagesTest.php @@ -242,7 +242,7 @@ public function test_developer_can_reply_and_the_team_is_notified(): void Notification::assertSentOnDemand( PluginDeveloperReplied::class, - fn (PluginDeveloperReplied $notification, array $channels, object $notifiable) => $notifiable->routes['mail'] === 'support@nativephp.com' + fn (PluginDeveloperReplied $notification, array $channels, object $notifiable) => $notifiable->routes['mail'] === ['support@nativephp.com', 'marketplace@nativephp.com'] && $notification->plugin->is($plugin) && $notification->activity->is($reply) );