1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

use client logger in MatrixRTCSessionManager (#4898)

This commit is contained in:
Richard van der Hoff
2025-07-03 16:56:51 +01:00
committed by GitHub
parent 9baba151c6
commit 70257e0ab4
2 changed files with 8 additions and 4 deletions

View File

@@ -1365,7 +1365,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
// NB. We initialise MatrixRTC whether we have call support or not: this is just // NB. We initialise MatrixRTC whether we have call support or not: this is just
// the underlying session management and doesn't use any actual media capabilities // the underlying session management and doesn't use any actual media capabilities
this.matrixRTC = new MatrixRTCSessionManager(this); this.matrixRTC = new MatrixRTCSessionManager(this.logger, this);
this.serverCapabilitiesService = new ServerCapabilities(this.logger, this.http); this.serverCapabilitiesService = new ServerCapabilities(this.logger, this.http);

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import { logger as rootLogger, type Logger } from "../logger.ts"; import { type Logger } from "../logger.ts";
import { type MatrixClient, ClientEvent } from "../client.ts"; import { type MatrixClient, ClientEvent } from "../client.ts";
import { TypedEventEmitter } from "../models/typed-event-emitter.ts"; import { TypedEventEmitter } from "../models/typed-event-emitter.ts";
import { type Room } from "../models/room.ts"; import { type Room } from "../models/room.ts";
@@ -48,8 +48,12 @@ export class MatrixRTCSessionManager extends TypedEventEmitter<MatrixRTCSessionM
// longer the correct session object for the room. // longer the correct session object for the room.
private roomSessions = new Map<string, MatrixRTCSession>(); private roomSessions = new Map<string, MatrixRTCSession>();
private logger: Logger; private readonly logger: Logger;
public constructor(private client: MatrixClient) {
public constructor(
rootLogger: Logger,
private client: MatrixClient,
) {
super(); super();
this.logger = rootLogger.getChild("[MatrixRTCSessionManager]"); this.logger = rootLogger.getChild("[MatrixRTCSessionManager]");
} }