Feature/fix external subscription client expiry (#6333)

* fix(sub): honor client expiry for external links

* fix(ui): show client expiry on external links

* fix(sub): address external expiry review
This commit is contained in:
duqigit
2026-09-04 04:32:05 +08:00
committed by GitHub
parent 13e87a18c8
commit 2ddcf53020
16 changed files with 332 additions and 61 deletions
+10
View File
@@ -0,0 +1,10 @@
export function resolveExternalLinkExpiry(
externalExpiry: number | null | undefined,
clientExpiry: number | null | undefined,
): number {
const explicitExpiry = Number(externalExpiry) || 0;
if (explicitExpiry > 0) return explicitExpiry;
const inheritedExpiry = Number(clientExpiry) || 0;
return inheritedExpiry > 0 ? inheritedExpiry : 0;
}