From 6bce17b58bdc10d6a696514433c82178d630d39c Mon Sep 17 00:00:00 2001 From: Chris Tankersley Date: Wed, 9 Aug 2023 11:42:05 -0400 Subject: [PATCH] fix(voice): Force NCCO actions to set value for NCCO type to avoid JS problems (#853) --- packages/voice/lib/classes/NCCO/Connect.ts | 2 +- packages/voice/lib/classes/NCCO/Conversation.ts | 2 +- packages/voice/lib/classes/NCCO/Record.ts | 2 +- packages/voice/lib/classes/NCCO/Stream.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/voice/lib/classes/NCCO/Connect.ts b/packages/voice/lib/classes/NCCO/Connect.ts index 034f7050..a2bc1752 100644 --- a/packages/voice/lib/classes/NCCO/Connect.ts +++ b/packages/voice/lib/classes/NCCO/Connect.ts @@ -63,7 +63,7 @@ export class Connect implements ConnectAction, Serializable { serializeToNCCO() { const data: ConnectAction = { - action: this.action, + action: NCCOActions.CONNECT, endpoint: this.endpoint, }; diff --git a/packages/voice/lib/classes/NCCO/Conversation.ts b/packages/voice/lib/classes/NCCO/Conversation.ts index d47614cc..b0110389 100644 --- a/packages/voice/lib/classes/NCCO/Conversation.ts +++ b/packages/voice/lib/classes/NCCO/Conversation.ts @@ -50,7 +50,7 @@ export class Conversation implements ConversationAction, Serializable { serializeToNCCO() { const data: ConversationAction = { - action: this.action, + action: NCCOActions.CONVERSATION, name: this.name, }; diff --git a/packages/voice/lib/classes/NCCO/Record.ts b/packages/voice/lib/classes/NCCO/Record.ts index 7a47c30a..b5f93e70 100644 --- a/packages/voice/lib/classes/NCCO/Record.ts +++ b/packages/voice/lib/classes/NCCO/Record.ts @@ -127,7 +127,7 @@ export class Record implements RecordAction { serializeToNCCO(): RecordAction { const data: RecordAction = { - action: this.action, + action: NCCOActions.RECORD, }; if (this.format) { diff --git a/packages/voice/lib/classes/NCCO/Stream.ts b/packages/voice/lib/classes/NCCO/Stream.ts index 6fe2742d..e3805ff6 100644 --- a/packages/voice/lib/classes/NCCO/Stream.ts +++ b/packages/voice/lib/classes/NCCO/Stream.ts @@ -30,7 +30,7 @@ export class Stream implements StreamAction, Serializable { serializeToNCCO() { const data: StreamAction = { - action: this.action, + action: NCCOActions.STREAM, streamUrl: this.streamUrl, };