wingbot 3.76.17 → 3.76.18

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Request.js +11 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.76.17",
3
+ "version": "3.76.18",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
package/src/Request.js CHANGED
@@ -173,6 +173,11 @@ class Request {
173
173
  */
174
174
  this.params = {};
175
175
 
176
+ /**
177
+ * @type {S} current state of the conversation
178
+ */
179
+ this.state = state;
180
+
176
181
  this.message = event.message || null;
177
182
 
178
183
  let usePostBack;
@@ -222,11 +227,6 @@ class Request {
222
227
  */
223
228
  this.pageId = pageId;
224
229
 
225
- /**
226
- * @type {S} current state of the conversation
227
- */
228
- this.state = state;
229
-
230
230
  /**
231
231
  * @type {string[]} features supported messaging features
232
232
  */
@@ -1353,10 +1353,12 @@ It looks like the bot isn't connected to class BotApp or the Processor is used w
1353
1353
  features = [FEATURE_TEXT]
1354
1354
  ) {
1355
1355
  const postback = {
1356
- payload: {
1357
- action,
1358
- data
1359
- }
1356
+ payload: data === null
1357
+ ? action
1358
+ : {
1359
+ action,
1360
+ data
1361
+ }
1360
1362
  };
1361
1363
  if (refAction) {
1362
1364
  Object.assign(postback, {