1
0
mirror of git://f0xx.org/ac/ac-deploy synced 2026-07-29 07:37:47 +03:00

cluster0: compose overlays lab-seed shortener; fix workspace git safe.dir

Re-copy ShortLinksRepository from NFS seed after ac-ms-* overlays;
deploy-ac-workspace allows all safe.directory; verify-mail-lab logs short URL.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-06-23 19:08:42 +02:00
parent 529bd61682
commit 62ba6aa615
4 changed files with 27 additions and 3 deletions

View File

@@ -29,10 +29,17 @@ final class AuthMailer {
$subject = 'Verify your Android Cast account';
$shortUrl = $verifyUrl;
$qrImageUrl = null;
if (class_exists('ShortLinksRepository', false)) {
if (is_callable(['ShortLinksRepository', 'shortenForOutboundMail'])) {
$pack = ShortLinksRepository::shortenForOutboundMail($verifyUrl, 86400);
$shortUrl = (string) ($pack['short_url'] ?? $verifyUrl);
$qrImageUrl = (string) ($pack['qr_image_url'] ?? '');
if ($qrImageUrl === '' && preg_match('#/([a-f0-9]{6,16})$#', $shortUrl, $m)) {
$qrImageUrl = preg_replace(
'#/([a-f0-9]{6,16})$#',
'/api/v1/qr/' . $m[1] . '.png',
$shortUrl
);
}
if ($qrImageUrl === '') {
$qrImageUrl = null;
}