From 48b2d688f3f6a1c45e2633bbde386b49cdefb140 Mon Sep 17 00:00:00 2001 From: Emmanuel Quentin Date: Tue, 20 Aug 2024 11:23:18 -0400 Subject: [PATCH] Use user uuid to check for callLog destination --- src/domain/CallLog.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/domain/CallLog.ts b/src/domain/CallLog.ts index b9af8099..b4fbd9fd 100644 --- a/src/domain/CallLog.ts +++ b/src/domain/CallLog.ts @@ -118,8 +118,7 @@ export default class CallLog { static parseNew(plain: CallLogResponse, session: Session): CallLog { const callLog: CallLog = CallLog.parse(plain); - // @TODO: FIXME add verification declined vs missed call - callLog.newMissedCall = session && session.hasExtension((plain.requested_extension || plain.destination_extension) as string) && !plain.answered; + callLog.newMissedCall = session && plain.destination_user_uuid === session.uuid && !plain.answered; return callLog; } @@ -203,7 +202,7 @@ export default class CallLog { } isAnOutgoingCall(session: Session): boolean { - console.warn(`@wazo/sdk + console.warn(`@wazo/sdk CallLog.isAnOutgoingcall(session) method is obsolete. Please use CallLog.isOutgoing(session). `);