Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(voice): Force NCCO actions to set value for NCCO type to avoid JS problems #853

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

dragonmantank
Copy link
Contributor

Description

When serializing an NCCO to a JS object, set the action to a static value instead of relying on the object's this.action property.

Motivation and Context

When making the JS Object serializations, using action: this.action to generate the resulting objects would always result in a blank value. This seems to work fine on some versions of node, for the unit tests, and in TS, but when running in a pure JS environment the resulting value was blank. Since NCCOs have a static action value based on their type, this just sets the value directly during deserialization.

Testing Details

Unit tests, as well as manual testing to help build the patch.

Example Output or Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2023

Codecov Report

Merging #853 (d98c7f6) into 3.x (f04c595) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              3.x     #853   +/-   ##
=======================================
  Coverage   83.42%   83.42%           
=======================================
  Files         119      119           
  Lines        1484     1484           
  Branches      283      283           
=======================================
  Hits         1238     1238           
  Misses        245      245           
  Partials        1        1           
Files Changed Coverage Δ
packages/voice/lib/classes/NCCO/Connect.ts 0.00% <ø> (ø)
packages/voice/lib/classes/NCCO/Conversation.ts 61.76% <ø> (ø)
packages/voice/lib/classes/NCCO/Record.ts 0.00% <ø> (ø)
packages/voice/lib/classes/NCCO/Stream.ts 0.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@manchuck manchuck merged commit 6bce17b into 3.x Aug 9, 2023
14 checks passed
@manchuck manchuck deleted the fix-ncco-actions-on-serialize branch August 9, 2023 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants