wingbot 3.35.0 → 3.35.1

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 +2 -2
  2. package/src/BotApp.js +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.35.0",
3
+ "version": "3.35.1",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -46,7 +46,7 @@
46
46
  "eslint-plugin-react": "^7.29.4",
47
47
  "graphql-markdown": "^6.0.0",
48
48
  "jsdoc-to-markdown": "^7.1.1",
49
- "mocha": "^9.2.2",
49
+ "mocha": "^10.0.0",
50
50
  "nyc": "^15.1.0",
51
51
  "rimraf": "^3.0.2",
52
52
  "sinon": "^13.0.1",
package/src/BotApp.js CHANGED
@@ -248,7 +248,7 @@ class BotApp {
248
248
  };
249
249
  }
250
250
 
251
- const sender = await this.createSender(senderId, pageId, message);
251
+ const sender = await this.createSender(senderId, pageId, message, secret, appId);
252
252
  const res = await this._processor.processMessage(message, pageId, sender, { appId });
253
253
  await this._processSenderResponses(sender, senderId, pageId, headers);
254
254
 
@@ -266,13 +266,15 @@ class BotApp {
266
266
  * @param {string} pageId
267
267
  * @param {object} [message]
268
268
  * @param {string|Promise<string>} [secret]
269
+ * @param {string} appId
269
270
  * @returns {Promise<BotAppSender>}
270
271
  */
271
272
  async createSender (
272
273
  senderId,
273
274
  pageId,
274
275
  message = defaultMsg(senderId, pageId),
275
- secret = this._secret
276
+ secret = this._secret,
277
+ appId = this._appId
276
278
  ) {
277
279
  const useSecret = await Promise.resolve(secret);
278
280
 
@@ -282,7 +284,7 @@ class BotApp {
282
284
  ...this._returnSenderOptions,
283
285
  apiUrl: this._apiUrl,
284
286
  pageId,
285
- appId: this._appId,
287
+ appId,
286
288
  secret: useSecret,
287
289
  mid: setResponseToMid,
288
290
  fetch: this._fetch,