wingbot 3.24.2 → 3.24.3
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/package.json +1 -1
- package/src/Request.js +12 -6
package/package.json
CHANGED
package/src/Request.js
CHANGED
|
@@ -338,16 +338,22 @@ class Request {
|
|
|
338
338
|
|
|
339
339
|
const entities = intent.entities || [];
|
|
340
340
|
|
|
341
|
-
|
|
341
|
+
let templateData = {
|
|
342
342
|
...stateData(this),
|
|
343
343
|
...getSetState(setState || {}, this),
|
|
344
344
|
intent: intent.intent,
|
|
345
|
-
entities
|
|
346
|
-
...entities.reduceRight((o, e) => ({
|
|
347
|
-
...o,
|
|
348
|
-
[`@${e.entity}`]: e.value
|
|
349
|
-
}), {})
|
|
345
|
+
entities
|
|
350
346
|
};
|
|
347
|
+
Object.keys(templateData)
|
|
348
|
+
.forEach((key) => {
|
|
349
|
+
if (key.match(/^@/)) {
|
|
350
|
+
delete templateData[key];
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
templateData = entities.reduceRight((o, e) => ({
|
|
354
|
+
...o,
|
|
355
|
+
[`@${e.entity}`]: e.value
|
|
356
|
+
}), templateData);
|
|
351
357
|
|
|
352
358
|
const textTemplate = typeof title === 'function'
|
|
353
359
|
? title
|