From df9ffdc4081b75faf45df70bfb364eccf80ee2d1 Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 16 Jun 2022 12:55:37 -0400 Subject: [PATCH] Don't ignore call member events with a distant future expiration date (#2466) to match updates to MSC3401 --- src/webrtc/groupCall.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/webrtc/groupCall.ts b/src/webrtc/groupCall.ts index 0b12f97f9..519b29095 100644 --- a/src/webrtc/groupCall.ts +++ b/src/webrtc/groupCall.ts @@ -139,8 +139,7 @@ const callMemberStateIsExpired = (event: MatrixEvent): boolean => { const now = Date.now(); const content = event?.getContent() ?? {}; const expiresAt = typeof content["m.expires_ts"] === "number" ? content["m.expires_ts"] : -Infinity; - // The event is expired if the expiration date has passed, or if it's unreasonably far in the future - return expiresAt <= now || expiresAt > now + CALL_MEMBER_STATE_TIMEOUT * 5 / 4; + return expiresAt <= now; }; function getCallUserId(call: MatrixCall): string | null {