Skip to content

Commit

Permalink
increase max age of incoming notify event to 15 seconds which trigger…
Browse files Browse the repository at this point in the history
…s a call ringingn notification/toast
  • Loading branch information
fkwp committed Dec 4, 2024
1 parent bc4a541 commit 5eade30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,8 @@ class NotifierClass extends TypedEventEmitter<keyof EmittedEvents, EmittedEvents
const thisUserHasConnectedDevice =
room && MatrixRTCSession.callMembershipsForRoom(room).some((m) => m.sender === cli.getUserId());

if (EventType.CallNotify === ev.getType() && (ev.getAge() ?? 0) < 90000 && !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") {
Expand Down

0 comments on commit 5eade30

Please sign in to comment.