Skip to content

Commit ee24989

Browse files
authored
increase ringing timeout from 10 seconds to 90 seconds (element-hq#28630)
* increase ringing timeout from 10 seconds to 90 seconds * increase ringing timeout from 10 seconds to 90 seconds * increase max age of incoming notify event to 15 seconds which triggers a call ringingn notification/toast
1 parent 5a418f3 commit ee24989

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: src/Notifier.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,8 @@ class NotifierClass extends TypedEventEmitter<keyof EmittedEvents, EmittedEvents
498498
const thisUserHasConnectedDevice =
499499
room && MatrixRTCSession.callMembershipsForRoom(room).some((m) => m.sender === cli.getUserId());
500500

501-
if (EventType.CallNotify === ev.getType() && (ev.getAge() ?? 0) < 10000 && !thisUserHasConnectedDevice) {
501+
// Check maximum age (<= 15 seconds) of a call notify event that will trigger a ringing notification
502+
if (EventType.CallNotify === ev.getType() && (ev.getAge() ?? 0) < 15000 && !thisUserHasConnectedDevice) {
502503
const content = ev.getContent();
503504
const roomId = ev.getRoomId();
504505
if (typeof content.call_id !== "string") {

Diff for: src/toasts/IncomingCallToast.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { useEventEmitter } from "../hooks/useEventEmitter";
3333
import { CallStore, CallStoreEvent } from "../stores/CallStore";
3434

3535
export const getIncomingCallToastKey = (callId: string, roomId: string): string => `call_${callId}_${roomId}`;
36-
const MAX_RING_TIME_MS = 10 * 1000;
36+
const MAX_RING_TIME_MS = 90 * 1000;
3737

3838
interface JoinCallButtonWithCallProps {
3939
onClick: (e: ButtonEvent) => void;

0 commit comments

Comments
 (0)