mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-25 06:40:26 +00:00
Fix event reemitting types
The callback args for reemitting will change to an array including the originals emitter.
This commit is contained in:
@@ -142,6 +142,7 @@ import {
|
||||
import { Publisher } from "./localMember/Publisher.ts";
|
||||
import { type Connection } from "./remoteMembers/Connection.ts";
|
||||
import { createLayoutModeSwitch } from "./LayoutSwitch.ts";
|
||||
import { IMembershipManager } from "matrix-js-sdk/lib/matrixrtc/IMembershipManager";
|
||||
|
||||
const logger = rootLogger.getChild("[CallViewModel]");
|
||||
//TODO
|
||||
@@ -445,8 +446,17 @@ export function createCallViewModel$(
|
||||
fromEvent(
|
||||
matrixRTCSession,
|
||||
MembershipManagerEvent.DelayIdChanged,
|
||||
) as Observable<string | undefined>
|
||||
).pipe(map((v) => v ?? null)),
|
||||
// The type of reemitted event includes the original emitted as the second arg.
|
||||
) as Observable<[string | undefined, IMembershipManager]>
|
||||
).pipe(
|
||||
map(([delayId]) => {
|
||||
logger.debug(
|
||||
"DelayId change emitted from matrixRTCSession: ",
|
||||
delayId,
|
||||
);
|
||||
return delayId ?? null;
|
||||
}),
|
||||
),
|
||||
matrixRTCSession.delayId ?? null,
|
||||
),
|
||||
roomId: matrixRoom.roomId,
|
||||
|
||||
@@ -177,8 +177,11 @@ export const createLocalTransport$ = ({
|
||||
switchMap(([customUrl, delayId, forceEndpoint]) => {
|
||||
logger.info(
|
||||
"Creating preferred transport based on: ",
|
||||
"customUrl: ",
|
||||
customUrl,
|
||||
"delayId: ",
|
||||
delayId,
|
||||
"forceEndpoint: ",
|
||||
forceEndpoint,
|
||||
);
|
||||
return from(
|
||||
|
||||
Reference in New Issue
Block a user