From d7c1ad00defac90ab8feb3a8d97eda32d360256e Mon Sep 17 00:00:00 2001 From: svenvg93 Date: Sat, 31 Jan 2026 12:19:16 +0000 Subject: [PATCH 1/3] bug: add server name and id to test wehbook --- app/Actions/Notifications/SendWebhookTestNotification.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Actions/Notifications/SendWebhookTestNotification.php b/app/Actions/Notifications/SendWebhookTestNotification.php index 45aa2abc5..d012ebe3c 100644 --- a/app/Actions/Notifications/SendWebhookTestNotification.php +++ b/app/Actions/Notifications/SendWebhookTestNotification.php @@ -33,6 +33,8 @@ public function handle(array $webhooks) ->payload([ 'result_id' => Str::uuid(), 'site_name' => __('settings/notifications.test_notifications.webhook.payload'), + 'server_name' => $fakeResult->data['server']['name'], + 'server_id' => $fakeResult->data['server']['id'], 'isp' => $fakeResult->data['isp'], 'ping' => $fakeResult->ping, 'download' => $fakeResult->download, From 066f28e0e29e2587082cb2cbbfff16ffad7c1485 Mon Sep 17 00:00:00 2001 From: svenvg93 Date: Sat, 31 Jan 2026 12:30:26 +0000 Subject: [PATCH 2/3] chore: align format with the completed --- app/Actions/Notifications/SendWebhookTestNotification.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Actions/Notifications/SendWebhookTestNotification.php b/app/Actions/Notifications/SendWebhookTestNotification.php index d012ebe3c..abd6f679c 100644 --- a/app/Actions/Notifications/SendWebhookTestNotification.php +++ b/app/Actions/Notifications/SendWebhookTestNotification.php @@ -3,6 +3,7 @@ namespace App\Actions\Notifications; use App\Models\Result; +use App\Helpers\Number; use App\Services\SpeedtestFakeResultGenerator; use Filament\Notifications\Notification; use Illuminate\Support\Str; @@ -36,9 +37,9 @@ public function handle(array $webhooks) 'server_name' => $fakeResult->data['server']['name'], 'server_id' => $fakeResult->data['server']['id'], 'isp' => $fakeResult->data['isp'], - 'ping' => $fakeResult->ping, - 'download' => $fakeResult->download, - 'upload' => $fakeResult->upload, + 'ping' => round($fakeResult->ping), + 'download' => Number::bitsToMagnitude(bits: $fakeResult->upload, precision: 0, magnitude: 'mbit'), + 'upload' => Number::bitsToMagnitude(bits: $fakeResult->download, precision: 0, magnitude: 'mbit'), 'packet_loss' => $fakeResult->data['packetLoss'], 'speedtest_url' => $fakeResult->data['result']['url'], 'url' => url('/admin/results'), From 09f2c788e58ba7e58c5aa2931e53cc27925a2706 Mon Sep 17 00:00:00 2001 From: svenvg93 Date: Sat, 31 Jan 2026 12:30:37 +0000 Subject: [PATCH 3/3] chore: pint --- app/Actions/Notifications/SendWebhookTestNotification.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Actions/Notifications/SendWebhookTestNotification.php b/app/Actions/Notifications/SendWebhookTestNotification.php index abd6f679c..70e8e62d2 100644 --- a/app/Actions/Notifications/SendWebhookTestNotification.php +++ b/app/Actions/Notifications/SendWebhookTestNotification.php @@ -2,8 +2,8 @@ namespace App\Actions\Notifications; -use App\Models\Result; use App\Helpers\Number; +use App\Models\Result; use App\Services\SpeedtestFakeResultGenerator; use Filament\Notifications\Notification; use Illuminate\Support\Str;