botbuilder
Advanced tools
Comparing version 3.2.2 to 3.2.3
@@ -154,9 +154,8 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
}; | ||
if (msg.address.conversation) { | ||
delete msg.address.conversation; | ||
} | ||
_this.ensureConversation(msg.address, function (adr) { | ||
msg.address = adr; | ||
var conversationId = msg.address.conversation ? msg.address.conversation.id : null; | ||
var storageCtx = { | ||
userId: msg.user.id, | ||
conversationId: conversationId, | ||
address: msg.address, | ||
@@ -166,3 +165,3 @@ persistUserData: _this.settings.persistUserData, | ||
}; | ||
_this.route(storageCtx, msg, dialogId, dialogArgs, _this.errorLogger(done)); | ||
_this.route(storageCtx, msg, dialogId, dialogArgs, _this.errorLogger(done), true); | ||
}, _this.errorLogger(done)); | ||
@@ -231,4 +230,5 @@ }, this.errorLogger(done)); | ||
}; | ||
UniversalBot.prototype.route = function (storageCtx, message, dialogId, dialogArgs, done) { | ||
UniversalBot.prototype.route = function (storageCtx, message, dialogId, dialogArgs, done, newStack) { | ||
var _this = this; | ||
if (newStack === void 0) { newStack = false; } | ||
var loadedData; | ||
@@ -263,3 +263,3 @@ this.getStorageData(storageCtx, function (data) { | ||
if (session.privateConversationData.hasOwnProperty(consts.Data.SessionState)) { | ||
sessionState = session.privateConversationData[consts.Data.SessionState]; | ||
sessionState = newStack ? null : session.privateConversationData[consts.Data.SessionState]; | ||
delete session.privateConversationData[consts.Data.SessionState]; | ||
@@ -266,0 +266,0 @@ } |
@@ -34,2 +34,3 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
var session = this; | ||
var now = new Date().getTime(); | ||
var middleware = this.options.middleware || []; | ||
@@ -44,7 +45,7 @@ var next = function () { | ||
_this.inMiddleware = false; | ||
_this.sessionState.lastAccess = now; | ||
_this.routeMessage(); | ||
} | ||
}; | ||
this.sessionState = sessionState || { callstack: [], lastAccess: 0, version: 0.0 }; | ||
this.sessionState.lastAccess = new Date().getTime(); | ||
this.sessionState = sessionState || { callstack: [], lastAccess: now, version: 0.0 }; | ||
var cur = this.curDialog(); | ||
@@ -51,0 +52,0 @@ if (cur) { |
@@ -5,3 +5,3 @@ { | ||
"description": "Bot Builder is a dialog system for building rich bots on virtually any platform.", | ||
"version": "3.2.2", | ||
"version": "3.2.3", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
@@ -7,3 +7,3 @@ var assert = require('assert'); | ||
it('should redirect to another dialog with arguments', function (done) { | ||
var connector = new builder.ConsoleConnector().listen(); | ||
var connector = new builder.ConsoleConnector(); | ||
var bot = new builder.UniversalBot(connector); | ||
@@ -32,3 +32,3 @@ bot.dialog('/', [ | ||
var step = 0; | ||
var connector = new builder.ConsoleConnector().listen(); | ||
var connector = new builder.ConsoleConnector(); | ||
var bot = new builder.UniversalBot(connector); | ||
@@ -35,0 +35,0 @@ bot.dialog('/', [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
312195
6801