mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-04 17:37:19 +00:00
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:
@@ -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