@tiledesk/tiledesk-server 2.4.5 → 2.4.7

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-server",
3
3
  "description": "The Tiledesk server module",
4
- "version": "2.4.5",
4
+ "version": "2.4.7",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
@@ -6,13 +6,13 @@ var config = require('../../config/database'); // get db config file
6
6
  let configSecretOrPubicKay = process.env.GLOBAL_SECRET || config.secret;
7
7
 
8
8
  var pKey = process.env.GLOBAL_SECRET_OR_PUB_KEY;
9
- // console.log("pKey",pKey);
9
+ console.log("pKey",pKey);
10
10
 
11
11
  if (pKey) {
12
12
  configSecretOrPubicKay = pKey.replace(/\\n/g, '\n');
13
13
  }
14
14
 
15
- // console.log("configSecretOrPubicKay",configSecretOrPubicKay);
15
+ console.log("configSecretOrPubicKay",configSecretOrPubicKay);
16
16
 
17
17
  class Listener {
18
18
 
@@ -23,6 +23,7 @@ class Listener {
23
23
  if (config.databaseUri) {
24
24
  winston.debug("apps config databaseUri: " + config.databaseUri);
25
25
  }
26
+ console.log("ACCESS_TOKEN_SECRET",process.env.APPS_ACCESS_TOKEN_SECRET || configSecretOrPubicKay);
26
27
 
27
28
  apps.startApp({
28
29
  ACCESS_TOKEN_SECRET: process.env.APPS_ACCESS_TOKEN_SECRET || configSecretOrPubicKay,
@@ -328,6 +328,7 @@ class RulesTrigger {
328
328
 
329
329
  var intentName = action.parameters.intentName;
330
330
  winston.debug('runAction action intentName: ' + intentName);
331
+
331
332
 
332
333
  var botId = action.parameters.botId;
333
334
  winston.debug('runAction action botId: ' + botId);
@@ -367,6 +368,11 @@ class RulesTrigger {
367
368
  winston.debug('runAction action payload: ', payload);
368
369
 
369
370
 
371
+ if (message && payload.text) {
372
+ payload.text = message;
373
+ winston.debug('forcing payload text to : ' + payload.text);
374
+ }
375
+
370
376
  delete payload.request.snapshot
371
377
 
372
378
  var json = {timestamp: Date.now(), payload: payload};