Member should be expired if there's no expires at key

This commit is contained in:
Robert Long 2022-10-18 12:56:58 -07:00
parent d66d9dbd5f
commit 2daf261974

View File

@ -434,5 +434,5 @@ export function memberExpiresAt(callDeviceMembership: CallDeviceMembership): num
export function isMemberExpired(callDeviceMembership: CallDeviceMembership, now: number, margin: number = 0) { export function isMemberExpired(callDeviceMembership: CallDeviceMembership, now: number, margin: number = 0) {
const expiresAt = memberExpiresAt(callDeviceMembership); const expiresAt = memberExpiresAt(callDeviceMembership);
return typeof expiresAt === "number" && ((expiresAt + margin) <= now); return typeof expiresAt === "number" ? ((expiresAt + margin) <= now) : true;
} }