feat: use my.immich.app for externalDomain fallback (#17209)

* feat: use my.immich.app for externalDomain fallback

This is probably more useful than localhost.

* chore: remove port param

* fix: update expected value in tests

* fix: update expected value in e2e
This commit is contained in:
bo0tzz
2025-03-31 13:08:41 +02:00
committed by GitHub
parent 74f7fd4b53
commit e4f83680d9
6 changed files with 14 additions and 21 deletions

View File

@@ -180,7 +180,6 @@ export class SharedLinkService extends BaseService {
}
const config = await this.getConfig({ withCache: true });
const { port } = this.configRepository.getEnv();
const sharedLink = await this.findOrFail(auth.sharedLink.userId, auth.sharedLink.id);
const assetId = sharedLink.album?.albumThumbnailAssetId || sharedLink.assets[0]?.id;
const assetCount = sharedLink.assets.length > 0 ? sharedLink.assets.length : sharedLink.album?.assets.length || 0;
@@ -191,7 +190,7 @@ export class SharedLinkService extends BaseService {
return {
title: sharedLink.album ? sharedLink.album.albumName : 'Public Share',
description: sharedLink.description || `${assetCount} shared photos & videos`,
imageUrl: new URL(imagePath, getExternalDomain(config.server, port)).href,
imageUrl: new URL(imagePath, getExternalDomain(config.server)).href,
};
}