Skip to content

Commit 370689f

Browse files
committed
rename notify -> notification
1 parent b3b45cd commit 370689f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

spec/unit/matrixrtc/MatrixRTCSession.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ describe("MatrixRTCSession", () => {
359359

360360
it("sends a notification when starting a call", async () => {
361361
// Simulate a join, including the update to the room state
362-
sess!.joinRoomSession([mockFocus], mockFocus, { notifyType: "ring" });
362+
sess!.joinRoomSession([mockFocus], mockFocus, { notificationType: "ring" });
363363
await Promise.race([sentStateEvent, new Promise((resolve) => setTimeout(resolve, 5000))]);
364364
mockRoomState(mockRoom, [{ ...membershipTemplate, user_id: client.getUserId()! }]);
365365
sess!.onRTCSessionMemberUpdate();
@@ -378,7 +378,7 @@ describe("MatrixRTCSession", () => {
378378
sess!.onRTCSessionMemberUpdate();
379379

380380
// Simulate a join, including the update to the room state
381-
sess!.joinRoomSession([mockFocus], mockFocus, { notifyType: "ring" });
381+
sess!.joinRoomSession([mockFocus], mockFocus, { notificationType: "ring" });
382382
await Promise.race([sentStateEvent, new Promise((resolve) => setTimeout(resolve, 5000))]);
383383
mockRoomState(mockRoom, [membershipTemplate, { ...membershipTemplate, user_id: client.getUserId()! }]);
384384
sess!.onRTCSessionMemberUpdate();
@@ -388,7 +388,7 @@ describe("MatrixRTCSession", () => {
388388

389389
it("doesn't send a notification when someone else starts the call faster than us", async () => {
390390
// Simulate a join, including the update to the room state
391-
sess!.joinRoomSession([mockFocus], mockFocus, { notifyType: "ring" });
391+
sess!.joinRoomSession([mockFocus], mockFocus, { notificationType: "ring" });
392392
await Promise.race([sentStateEvent, new Promise((resolve) => setTimeout(resolve, 5000))]);
393393
// But this time we want to simulate a race condition in which we receive a state event
394394
// from someone else, starting the call before our own state event has been sent

src/matrixrtc/MatrixRTCSession.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export interface SessionConfig {
7171
* What kind of notification to send when starting the session.
7272
* @default `undefined` (no notification)
7373
*/
74-
notifyType?: CallNotifyType;
74+
notificationType?: CallNotifyType;
7575
}
7676

7777
// The names follow these principles:
@@ -573,12 +573,12 @@ export class MatrixRTCSession extends TypedEventEmitter<
573573
* Sends a notification corresponding to the configured notify type.
574574
*/
575575
private sendCallNotify(): void {
576-
if (this.joinConfig?.notifyType !== undefined) {
576+
if (this.joinConfig?.notificationType !== undefined) {
577577
this.client
578578
.sendEvent(this.roomSubset.roomId, EventType.CallNotify, {
579579
"application": "m.call",
580580
"m.mentions": { user_ids: [], room: true },
581-
"notify_type": this.joinConfig.notifyType,
581+
"notify_type": this.joinConfig.notificationType,
582582
"call_id": this.callId!,
583583
})
584584
.catch((e) => this.logger.error("Failed to send call notification", e));

0 commit comments

Comments
 (0)