increase ringing timeout from 10 seconds to 90 seconds (#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/toastpull/28646/head
parent
5a418f3f19
commit
ee24989f49
|
@ -498,7 +498,8 @@ class NotifierClass extends TypedEventEmitter<keyof EmittedEvents, EmittedEvents
|
||||||
const thisUserHasConnectedDevice =
|
const thisUserHasConnectedDevice =
|
||||||
room && MatrixRTCSession.callMembershipsForRoom(room).some((m) => m.sender === cli.getUserId());
|
room && MatrixRTCSession.callMembershipsForRoom(room).some((m) => 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 content = ev.getContent();
|
||||||
const roomId = ev.getRoomId();
|
const roomId = ev.getRoomId();
|
||||||
if (typeof content.call_id !== "string") {
|
if (typeof content.call_id !== "string") {
|
||||||
|
|
|
@ -33,7 +33,7 @@ import { useEventEmitter } from "../hooks/useEventEmitter";
|
||||||
import { CallStore, CallStoreEvent } from "../stores/CallStore";
|
import { CallStore, CallStoreEvent } from "../stores/CallStore";
|
||||||
|
|
||||||
export const getIncomingCallToastKey = (callId: string, roomId: string): string => `call_${callId}_${roomId}`;
|
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 {
|
interface JoinCallButtonWithCallProps {
|
||||||
onClick: (e: ButtonEvent) => void;
|
onClick: (e: ButtonEvent) => void;
|
||||||
|
|
Loading…
Reference in New Issue