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:
1 parent
13e87a18c8
commit
2ddcf53020
16 files changed
+332
-61
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user