Update UpdateController.php

This commit is contained in:
Hosteroid
2026-02-11 19:55:56 +02:00
parent 30a139d765
commit aca4c14b8b

View File

@@ -115,13 +115,12 @@ class UpdateController extends Controller
if (!$hasMigrations) {
try {
$notificationService = new NotificationService();
// For hotfixes the "to_version" is a commit SHA (e.g. "4371f17"),
// not a semver string. Pass the current app version so the
// notification reads "v1.1.3 has been updated" instead of "v4371f17".
$notifyToVersion = ($type === 'hotfix') ? $fromVersion : $toVersion;
// For hotfixes $toVersion is a commit SHA (e.g. "4371f17").
// notifySystemUpgrade() detects the SHA format and includes it
// in the message as "hotfix <sha>".
$notificationService->notifyAdminsUpgrade(
$fromVersion,
$notifyToVersion,
$toVersion,
0,
!empty($result['composer_manual_required'])
);