wingbot 3.65.2 → 3.65.4

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/Responder.js +11 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.65.2",
3
+ "version": "3.65.4",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Responder.js CHANGED
@@ -779,7 +779,17 @@ class Responder {
779
779
  e.match
780
780
  .forEach((rule) => {
781
781
  if (rule.startsWith('#')) {
782
- // @todo propagate also keywords
782
+ if (!rule.match(/^#(\|?[a-z0-9-]+)+#?$/i)) {
783
+ return;
784
+ }
785
+ const keywords = rule.match(/\|?[a-z0-9-]+/ig)
786
+ .map((k) => k
787
+ .replace(/\|/g, '')
788
+ .replace(/[-\s]+/g, ' '));
789
+
790
+ expectedIntentsAndEntities.push(
791
+ ...keywords
792
+ );
783
793
  return;
784
794
  }
785
795
  if (rule.startsWith('@')) {