From c81d8e79377f47df1fd307127fc103683b96276d Mon Sep 17 00:00:00 2001 From: m5r Date: Wed, 1 Sep 2021 07:12:47 +0800 Subject: [PATCH] set state call_in_progress --- app/phone-calls/hooks/use-make-call.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/phone-calls/hooks/use-make-call.ts b/app/phone-calls/hooks/use-make-call.ts index b6b188d..adc8f1a 100644 --- a/app/phone-calls/hooks/use-make-call.ts +++ b/app/phone-calls/hooks/use-make-call.ts @@ -40,9 +40,8 @@ export default function useMakeCall({ recipient, onHangUp }: Params) { // @ts-ignore window.ddd = outgoingConnection; - // TODO: setState("call_in_progress"); - // TODO: remove event listeners + outgoingConnection.once("accept", (call: Call) => setState("call_in_progress")); outgoingConnection.on("cancel", endCall); outgoingConnection.on("disconnect", endCall); outgoingConnection.on("error", (error) => {