dialogflow: can optionally specify an environment

This commit is contained in:
Dave Horton
2021-01-13 21:21:26 -05:00
parent 2a8f165468
commit 63a00063c1
2 changed files with 3 additions and 1 deletions

View File

@@ -11,7 +11,8 @@ class Dialogflow extends Task {
this.preconditions = TaskPreconditions.Endpoint;
this.credentials = this.data.credentials;
this.project = this.data.project;
if (this.data.environment) this.project = `${this.data.project}:${this.data.environment}`;
else this.project = this.data.project;
this.lang = this.data.lang || 'en-US';
this.welcomeEvent = this.data.welcomeEvent || '';
if (this.welcomeEvent.length && this.data.welcomeEventParams && typeof this.data.welcomeEventParams === 'object') {