Replace deprecated CallMembership.sender with userId

This commit is contained in:
Robin
2025-10-14 12:07:51 -04:00
parent bcbf7a90f0
commit 13636b78d9
16 changed files with 61 additions and 63 deletions

View File

@@ -156,7 +156,7 @@ test("plays one sound when a hand is raised", () => {
act(() => {
handRaisedSubject$.next({
// TODO: What is this string supposed to be?
[`${bobRtcMember.sender}:${bobRtcMember.deviceId}`]: {
[`${bobRtcMember.userId}:${bobRtcMember.deviceId}`]: {
time: new Date(),
membershipEventId: "",
reactionEventId: "",

View File

@@ -122,7 +122,7 @@ function createGroupCallView(
} {
const client = {
getUser: () => null,
getUserId: () => localRtcMember.sender,
getUserId: () => localRtcMember.userId,
getDeviceId: () => localRtcMember.deviceId,
getRoom: (rId) => (rId === roomId ? room : null),
} as Partial<MatrixClient> as MatrixClient;

View File

@@ -211,7 +211,7 @@ export const GroupCallView: FC<Props> = ({
// Count each member only once, regardless of how many devices they use
const participantCount = useMemo(
() => new Set<string>(memberships.map((m) => m.sender!)).size,
() => new Set<string>(memberships.map((m) => m.userId!)).size,
[memberships],
);

View File

@@ -110,7 +110,7 @@ function createInCallView(): RenderResult & {
} {
const client = {
getUser: () => null,
getUserId: () => localRtcMember.sender,
getUserId: () => localRtcMember.userId,
getDeviceId: () => localRtcMember.deviceId,
getRoom: (rId) => (rId === roomId ? room : null),
} as Partial<MatrixClient> as MatrixClient;