fix(all): HEAR call back errors removed.

This commit is contained in:
Rodrigo Rodriguez 2021-08-10 20:59:56 -03:00
parent 4faaff6336
commit 375d107dd2
5 changed files with 15 additions and 10 deletions

View file

@ -140,6 +140,10 @@ export class DialogKeywords {
* *
*/ */
public getToLst(array, member) { public getToLst(array, member) {
if (!array)
{
return "<Empty>"
}
if (array[0] && array[0]['gbarray']) { if (array[0] && array[0]['gbarray']) {
array = array.slice(1); array = array.slice(1);
} }

View file

@ -757,7 +757,7 @@ export class GBVMService extends GBService {
delete min.cbMap[id]; delete min.cbMap[id];
try { try {
const opts = await promise(step, result); const opts = await promise(step, result);
if (Object.keys(min.cbMap).length > 0) { if (opts) {
return await step.replaceDialog('/hear', opts); return await step.replaceDialog('/hear', opts);
} }
} catch (error) { } catch (error) {

View file

@ -929,13 +929,13 @@ export class GBMinService {
} else if (context.activity.type === 'message') { } else if (context.activity.type === 'message') {
// Process messages activities. // Processes messages activities.
await this.processMessageActivity(context, min, step); await this.processMessageActivity(context, min, step);
} else if (context.activity.type === 'event') { } else if (context.activity.type === 'event') {
// Processes events activies. // Processes events activities.
await this.processEventActivity(min, user, context, step); await this.processEventActivity(min, user, context, step);
} }

View file

@ -13,8 +13,9 @@ export const Messages = {
which_language: 'Please, type the language name you would like to talk through.', which_language: 'Please, type the language name you would like to talk through.',
validation_enter_valid_email: 'Please enter a valid e-mail.', validation_enter_valid_email: 'Please enter a valid e-mail.',
language_chosen: 'Very good, so let\'s go...', language_chosen: 'Very good, so let\'s go...',
affirmative_sentences: /^(\bsim\b|\bs\b|\bpositivo\b|\bafirmativo\b|\bclaro\b|\bevidente\b|\bsem dúvida\b|\bconfirmo\b|\bconfirmar\b|\bconfirmado\b|\buhum\b|\bsi\b|\by\b|\byes\b|\bsure\b)/i affirmative_sentences: /^(\bsim\b|\bs\b|\bpositivo\b|\bafirmativo\b|\bclaro\b|\bevidente\b|\bsem dúvida\b|\bconfirmo\b|\bconfirmar\b|\bconfirmado\b|\buhum\b|\bsi\b|\by\b|\byes\b|\bsure\b)/i,
will_answer_projector:
'I\'ll answer on the projector to a better experience...',
}, },
'pt-BR': { 'pt-BR': {
show_video: 'Vou te mostrar um vídeo. Por favor, aguarde...', show_video: 'Vou te mostrar um vídeo. Por favor, aguarde...',
@ -28,7 +29,9 @@ export const Messages = {
which_language: 'Por favor, digite o idioma que você gostaria de usar para conversarmos.', which_language: 'Por favor, digite o idioma que você gostaria de usar para conversarmos.',
validation_enter_valid_email: 'Por favor digite um email válido.', validation_enter_valid_email: 'Por favor digite um email válido.',
language_chosen: 'Muito bem, então vamos lá...', language_chosen: 'Muito bem, então vamos lá...',
affirmative_sentences: /^(\bsim\b|\bs\b|\bpositivo\b|\bafirmativo\b|\bclaro\b|\bevidente\b|\bsem dúvida\b|\bconfirmo\b|\bconfirmar\b|\bconfirmado\b|\buhum\b|\bsi\b|\by\b|\byes\b|\bsure\b)/i affirmative_sentences: /^(\bsim\b|\bs\b|\bpositivo\b|\bafirmativo\b|\bclaro\b|\bevidente\b|\bsem dúvida\b|\bconfirmo\b|\bconfirmar\b|\bconfirmado\b|\buhum\b|\bsi\b|\by\b|\byes\b|\bsure\b)/i,
will_answer_projector:
'Vou te responder na tela para melhor visualização...',
} }
}; };

View file

@ -11,8 +11,7 @@ export const Messages = {
lets_search: query => lets_search: query =>
`Lets search for ${query}... What do you want to know?`, `Lets search for ${query}... What do you want to know?`,
see_faq: 'Please take a look at the FAQ I\'ve prepared for you. You can click on them to get the answer.', see_faq: 'Please take a look at the FAQ I\'ve prepared for you. You can click on them to get the answer.',
will_answer_projector:
'I\'ll answer on the projector to a better experience...',
ask_first_time: 'What are you looking for?' ask_first_time: 'What are you looking for?'
}, },
'pt-BR': { 'pt-BR': {
@ -28,8 +27,7 @@ export const Messages = {
`Let's search about ${query}... What do you want to know?`, `Let's search about ${query}... What do you want to know?`,
see_faq: see_faq:
'Veja algumas perguntas mais frequentes logo na tela. Clique numa delas para eu responder.', 'Veja algumas perguntas mais frequentes logo na tela. Clique numa delas para eu responder.',
will_answer_projector:
'Vou te responder na tela para melhor visualização...',
ask_first_time: 'Como eu posso ajudar?' ask_first_time: 'Como eu posso ajudar?'
} }
}; };