wingbot 3.47.1 → 3.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.47.1",
3
+ "version": "3.48.0",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Responder.js CHANGED
@@ -66,6 +66,7 @@ Object.freeze(ExpectedInput);
66
66
  * @prop {string} [style]
67
67
  * @prop {string} [language]
68
68
  * @prop {string} [voice]
69
+ * @prop {number} [timeout]
69
70
  */
70
71
 
71
72
  /**
@@ -32,7 +32,7 @@ const {
32
32
  function getVoiceControlFromParams (params, lang = null) {
33
33
  const voiceControl = {};
34
34
 
35
- const voiceControlProps = ['speed', 'pitch', 'volume', 'voice', 'style', 'language'];
35
+ const voiceControlProps = ['speed', 'pitch', 'volume', 'voice', 'style', 'language', 'timeout'];
36
36
 
37
37
  voiceControlProps.forEach((prop) => {
38
38
  if (params[prop]) {
@@ -64,7 +64,7 @@ const stringToNumber = (string) => {
64
64
  };
65
65
 
66
66
  const toNumber = (value) => {
67
- if (value === undefined) return 0;
67
+ if (value === undefined || value === null) return 0;
68
68
  if (typeof value === 'number') return value;
69
69
  if (Array.isArray(value)) return value.length;
70
70
  return (isStringNumber(value) ? stringToNumber(value) : Number.parseFloat(value));