wingbot 3.45.1 → 3.45.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 +1 -1
- package/src/BotApp.js +4 -2
package/package.json
CHANGED
package/src/BotApp.js
CHANGED
|
@@ -198,7 +198,9 @@ class BotApp {
|
|
|
198
198
|
registerAnalyticsStorage (analyticsStorage, options = {}) {
|
|
199
199
|
const log = this._logger || options.log;
|
|
200
200
|
|
|
201
|
-
analyticsStorage.setDefaultLogger
|
|
201
|
+
if (typeof analyticsStorage.setDefaultLogger === 'function') {
|
|
202
|
+
analyticsStorage.setDefaultLogger(log);
|
|
203
|
+
}
|
|
202
204
|
|
|
203
205
|
const { onInteraction, onEvent } = onInteractionHandler({
|
|
204
206
|
log,
|
|
@@ -221,7 +223,7 @@ class BotApp {
|
|
|
221
223
|
* @param {boolean} [nonInteractive]
|
|
222
224
|
*/
|
|
223
225
|
async trackEvent (pageId, senderId, event, ts = Date.now(), nonInteractive = false) {
|
|
224
|
-
const state = this._processor.stateStorage.getState(senderId, pageId);
|
|
226
|
+
const state = await this._processor.stateStorage.getState(senderId, pageId);
|
|
225
227
|
|
|
226
228
|
if (!state) {
|
|
227
229
|
throw new Error(`State ${pageId}:${senderId} not found. Ensure the #trackEvent() method was called after the conversation has started`);
|