fix(team): mark servers unreachable when subscription ends

Set unreachable_count to 3 and unreachable_notification_sent to true
on all team servers in subscriptionEnded(), so the existing cleanup
command can pick them up after the 7-day grace period.

Also adds feature tests for the subscription-ended cleanup flow and
casts server IP to string in existing unreachable server tests to fix
type comparison.
This commit is contained in:
Andras Bacsai committed 2026-04-15 15:12:29 +02:00
1 parent a5b3d3a536
commit 3a8f52ce16
3 files changed
+84 -4

No files matched your search

+3 -1
View File
@@ -233,6 +233,9 @@ class Team extends Model implements SendsDiscord, SendsEmail, SendsPushover, Sen
'is_reachable' => false,
]);
ServerReachabilityChanged::dispatch($server);
$server->unreachable_count = 3;
$server->unreachable_notification_sent = true;
$server->save();
}
}
@@ -344,5 +347,4 @@ class Team extends Model implements SendsDiscord, SendsEmail, SendsPushover, Sen
{
return $this->hasOne(WebhookNotificationSettings::class);
}
}