Skip to content

Commit 5eade30

Browse files
committed
increase max age of incoming notify event to 15 seconds which triggers a call ringingn notification/toast
1 parent bc4a541 commit 5eade30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Notifier.ts

Lines changed: 2 additions & 1 deletion
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) < 90000 && !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") {

0 commit comments

Comments
 (0)