diff --git a/src/Notifier.ts b/src/Notifier.ts index 45e6a1195d..c724c4780c 100644 --- a/src/Notifier.ts +++ b/src/Notifier.ts @@ -498,7 +498,8 @@ class NotifierClass extends TypedEventEmitter m.sender === cli.getUserId()); - if (EventType.CallNotify === ev.getType() && (ev.getAge() ?? 0) < 10000 && !thisUserHasConnectedDevice) { + // Check maximum age (<= 15 seconds) of a call notify event that will trigger a ringing notification + if (EventType.CallNotify === ev.getType() && (ev.getAge() ?? 0) < 15000 && !thisUserHasConnectedDevice) { const content = ev.getContent(); const roomId = ev.getRoomId(); if (typeof content.call_id !== "string") { diff --git a/src/toasts/IncomingCallToast.tsx b/src/toasts/IncomingCallToast.tsx index bdad2d4565..58e6980733 100644 --- a/src/toasts/IncomingCallToast.tsx +++ b/src/toasts/IncomingCallToast.tsx @@ -33,7 +33,7 @@ import { useEventEmitter } from "../hooks/useEventEmitter"; import { CallStore, CallStoreEvent } from "../stores/CallStore"; export const getIncomingCallToastKey = (callId: string, roomId: string): string => `call_${callId}_${roomId}`; -const MAX_RING_TIME_MS = 10 * 1000; +const MAX_RING_TIME_MS = 90 * 1000; interface JoinCallButtonWithCallProps { onClick: (e: ButtonEvent) => void;