wingbot 3.26.0-alpha.1 → 3.26.0-alpha.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.26.0-alpha.1",
3
+ "version": "3.26.0-alpha.2",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/BotApp.js CHANGED
@@ -100,6 +100,18 @@ class BotApp {
100
100
  this._preferSynchronousResponse = preferSynchronousResponse;
101
101
  }
102
102
 
103
+ /**
104
+ * Get authorization token for wingbot orchestrator
105
+ *
106
+ * @param {string} body
107
+ * @param {string} secret
108
+ * @param {string} appId
109
+ * @returns {Promise<string>}
110
+ */
111
+ static signBody (body, secret, appId) {
112
+ return BotApp.signBody(body, secret, appId);
113
+ }
114
+
103
115
  /**
104
116
  * Returns processor plugin, which updates thread context automatically
105
117
  *
@@ -179,7 +179,7 @@ function getSetState (setState = {}, req, res = null, useState = null) {
179
179
  const useValue = typeof value === 'string'
180
180
  ? handlebars.compile(value)(stateData(req, res))
181
181
  .split(/(?<!\\),/g)
182
- .map((v) => v.trim())
182
+ .map((v) => v.replace(/\\,/g, ',').trim())
183
183
  : value;
184
184
  values = toArray(useValue);
185
185
  }