You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
MatrixRTC: Implement expiry logic for CallMembership and additional test coverage (#4587)
* remove all legacy call related code and adjust tests. We actually had a bit of tests just for legacy and not for session events. All those tests got ported over so we do not remove any tests. * dont adjust tests but remove legacy tests * Remove deprecated CallMembership.getLocalExpiry() * Remove references to legacy in test case names * Clean up SessionMembershipData tsdoc * Remove CallMembership.expires * Use correct expire duration. * make expiration methods not return optional values and update docstring * add docs to `SessionMembershipData` * Add new tests for session type member events that before only existed for legacy member events. This reverts commit 795a3cffb61d672941c49e8139eb1d7b15c87d73. * remove code we do not need yet. * Cleanup --------- Co-authored-by: Hugh Nimmo-Smith <hughns@matrix.org>
This commit is contained in:
@@ -21,7 +21,7 @@ import { Room } from "../models/room.ts";
|
||||
import { MatrixClient } from "../client.ts";
|
||||
import { EventType } from "../@types/event.ts";
|
||||
import { UpdateDelayedEventAction } from "../@types/requests.ts";
|
||||
import { CallMembership, SessionMembershipData } from "./CallMembership.ts";
|
||||
import { CallMembership, DEFAULT_EXPIRE_DURATION, SessionMembershipData } from "./CallMembership.ts";
|
||||
import { RoomStateEvent } from "../models/room-state.ts";
|
||||
import { Focus } from "./focus.ts";
|
||||
import { secureRandomBase64Url } from "../randomstring.ts";
|
||||
@@ -33,8 +33,6 @@ import { MatrixEvent } from "../models/event.ts";
|
||||
import { isLivekitFocusActive } from "./LivekitFocus.ts";
|
||||
import { sleep } from "../utils.ts";
|
||||
|
||||
const DEFAULT_EXPIRE_DURATION = 1000 * 60 * 60 * 4; // 4 hours
|
||||
|
||||
const logger = rootLogger.getChild("MatrixRTCSession");
|
||||
|
||||
const getParticipantId = (userId: string, deviceId: string): string => `${userId}:${deviceId}`;
|
||||
|
||||
Reference in New Issue
Block a user