validate call webhook and translate call status

This commit is contained in:
m5r
2021-08-20 08:20:03 +08:00
parent c43979d6b7
commit a289e9a4ef
2 changed files with 29 additions and 3 deletions

View File

@ -71,6 +71,9 @@ export default function useMakeCall({ recipient, onHangUp }: Params) {
// @ts-ignore
window.ddd = outgoingConnection;
// TODO: setState("call_in_progress");
// TODO: remove event listeners
outgoingConnection.on("cancel", () => setState("call_ended"));
outgoingConnection.on("disconnect", () => setState("call_ending"));
outgoingConnection.on("error", (error) => {