@onereach/step-voice 6.1.11-repromptsimprovements.0 → 6.1.11
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/dst/Choice.js
CHANGED
|
@@ -169,9 +169,9 @@ class Choice extends voice_1.default {
|
|
|
169
169
|
// There might be hooks after this step which we will try to avoid
|
|
170
170
|
return this.exitStep(exitId, this.exitChoiceData('voice', params), longRecognition);
|
|
171
171
|
}
|
|
172
|
-
else if ((lodash_1.default.isUndefined(usePromptsForUnrecognized) || usePromptsForUnrecognized)
|
|
173
|
-
this.
|
|
174
|
-
|
|
172
|
+
else if (((lodash_1.default.isUndefined(usePromptsForUnrecognized) || usePromptsForUnrecognized) ||
|
|
173
|
+
(usePromptsTriggers ? isRepromptTrigger(phrases, this.data.promptsTriggers) : true)) &&
|
|
174
|
+
this.rptsHasMore({ repromptsList })) {
|
|
175
175
|
await this.transcript(call, {
|
|
176
176
|
message: 'Unrecognized',
|
|
177
177
|
voiceProcessResult,
|
|
@@ -55,7 +55,7 @@ const alterRecognitionPhrases = (phrases, interpretation) => {
|
|
|
55
55
|
class CustomVoiceInput extends voice_1.default {
|
|
56
56
|
async runStep() {
|
|
57
57
|
const call = await this.fetchData();
|
|
58
|
-
const { textType, tts, sensitiveData, noReplyDelay, usePromptsTriggers, recognitionModel, phraseList
|
|
58
|
+
const { textType, tts, sensitiveData, noReplyDelay, usePromptsTriggers, recognitionModel, phraseList } = this.data;
|
|
59
59
|
const exitExists = (exitId) => {
|
|
60
60
|
return lodash_1.default.some(choices, (choice) => choice.exitId === exitId);
|
|
61
61
|
};
|
|
@@ -116,8 +116,7 @@ class CustomVoiceInput extends voice_1.default {
|
|
|
116
116
|
// There might be hooks after this step which we will try to avoid
|
|
117
117
|
return this.exitStep(exitId, this.exitChoiceData('voice', params));
|
|
118
118
|
}
|
|
119
|
-
else if (
|
|
120
|
-
this.rptsHasMore({ repromptsList }) &&
|
|
119
|
+
else if (this.rptsHasMore({ repromptsList }) &&
|
|
121
120
|
(usePromptsTriggers ? isRepromptTrigger(phrases, this.data.promptsTriggers) : true)) {
|
|
122
121
|
await this.transcript(call, {
|
|
123
122
|
message: 'Unrecognized',
|