botframework-webchat-core
Advanced tools
Comparing version 4.1.1-master.688120d to 4.1.1-master.6bc279f
@@ -25,6 +25,6 @@ "use strict"; | ||
var store = (0, _redux.createStore)(_reducer.default, initialState || {}, _redux.applyMiddleware.apply(void 0, [sagaMiddleware].concat(middlewares))); | ||
var store = (0, _redux.createStore)(_reducer.default, initialState || {}, _redux.applyMiddleware.apply(void 0, middlewares.concat([sagaMiddleware]))); | ||
sagaMiddleware.run(_sagas.default); | ||
return store; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGVTdG9yZS50cyJdLCJuYW1lcyI6WyJpbml0aWFsU3RhdGUiLCJzYWdhTWlkZGxld2FyZSIsIm1pZGRsZXdhcmVzIiwic3RvcmUiLCJyZWR1Y2VyIiwiYXBwbHlNaWRkbGV3YXJlIiwicnVuIiwic2FnYXMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBOztBQUNBOztBQUVBOztBQUNBOztBQUtlLGtCQUFVQSxZQUFWLEVBQXdDO0FBQ3JELE1BQU1DLGNBQWMsR0FBRyx5QkFBdkI7O0FBRHFELG9DQUFiQyxXQUFhO0FBQWJBLElBQUFBLFdBQWE7QUFBQTs7QUFFckQsTUFBTUMsS0FBbUIsR0FBRyx3QkFDMUJDLGdCQUQwQixFQUUxQkosWUFBWSxJQUFJLEVBRlUsRUFHMUJLLHNDQUNFSixjQURGLFNBRUtDLFdBRkwsRUFIMEIsQ0FBNUI7QUFTQUQsRUFBQUEsY0FBYyxDQUFDSyxHQUFmLENBQW1CQyxjQUFuQjtBQUVBLFNBQU9KLEtBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGFwcGx5TWlkZGxld2FyZSwgY3JlYXRlU3RvcmUsIFN0b3JlIH0gZnJvbSAncmVkdXgnO1xuaW1wb3J0IGNyZWF0ZVNhZ2FNaWRkbGV3YXJlIGZyb20gJ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nJvbSAnLi9hY3Rpb25zL3N1Ym1pdFNlbmRCb3gnO1xuXG5pbXBvcnQgKiBhcyBBY3Rpdml0eUNsaWVudFN0YXRlIGZyb20gJy4vY29uc3RhbnRzL0FjdGl2aXR5Q2xpZW50U3RhdGUnO1xuaW1wb3J0ICogYXMgRGljdGF0ZVN0YXRlIGZyb20gJy4vY29uc3RhbnRzL0RpY3RhdGVTdGF0ZSc7XG5cbmNvbnN0IENvbnN0YW50cyA9IHsgQWN0aXZpdHlDbGllbnRTdGF0ZSwgRGljdGF0ZVN0YXRlIH07XG5jb25zdCB2ZXJzaW9uID0gVkVSU0lPTjtcblxuZXhwb3J0IHtcbiAgY29ubmVjdCxcbiAgQ29uc3RhbnRzLFxuICBjcmVhdGVTdG9yZSxcbiAgZGlzY29ubmVjdCxcbiAgbWFya0FjdGl2aXR5LFxuICBwb3N0QWN0aXZpdHksXG4gIHNlbmRGaWxlcyxcbiAgc2VuZE1lc3NhZ2UsXG4gIHNlbmRQb3N0QmFjayxcbiAgc2V0RGljdGF0ZUludGVyaW1zLFxuICBzZXREaWN0YXRlU3RhdGUsXG4gIHNldExhbmd1YWdlLFxuICBzZXRTZW5kQm94LFxuICBzZXRTZW5kVGltZW91dCxcbiAgc2V0U2VuZFR5cGluZyxcbiAgc3RhcnREaWN0YXRlLFxuICBzdGFydFNwZWFraW5nQWN0aXZpdHksXG4gIHN0b3BEaWN0YXRlLFxuICBzdG9wU3BlYWtpbmdBY3Rpdml0eSxcbiAgc3VibWl0U2VuZEJveCxcbiAgdmVyc2lvblxufVxuIl19 |
@@ -63,7 +63,13 @@ "use strict"; | ||
if (!activity.from.role) { | ||
if (!activity.from) { | ||
activity.from = { | ||
role: 'channel' | ||
}; | ||
} else if (!activity.from.role) { | ||
if (activity.from.id === userID) { | ||
activity.from.role = 'user'; | ||
} else if (activity.from.id) { | ||
activity.from.role = 'bot'; | ||
} else { | ||
activity.from.role = 'bot'; | ||
activity.from.role = 'channel'; | ||
} | ||
@@ -89,3 +95,3 @@ } | ||
if (!(lastMessageActivity.from.role === 'bot')) { | ||
if (!(lastMessageActivity && lastMessageActivity.from && lastMessageActivity.from.role === 'bot')) { | ||
_context.next = 14; | ||
@@ -124,2 +130,2 @@ break; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9pbmNvbWluZ0FjdGl2aXR5U2FnYS5qcyJdLCJuYW1lcyI6WyJsYXN0IiwiYXJyYXkiLCJwcmVkaWNhdGUiLCJpIiwibGVuZ3RoIiwiaXRlbSIsImNhbGwiLCJkaXJlY3RMaW5lIiwidXNlcklEIiwiYWN0aXZpdHkkIiwiYWN0aXZpdHkiLCJmcm9tIiwicm9sZSIsImlkIiwiYWN0aXZpdGllcyIsImxhc3RNZXNzYWdlQWN0aXZpdHkiLCJ0eXBlIiwic3VnZ2VzdGVkQWN0aW9ucyIsImFjdGlvbnMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFLQTs7QUFDQTs7QUFFQTs7QUFDQTs7Ozs7O0FBRUEsU0FBU0EsSUFBVCxDQUFjQyxLQUFkLEVBQXFCQyxTQUFyQixFQUFnQztBQUM5QixPQUFLLElBQUlDLENBQUMsR0FBR0YsS0FBSyxDQUFDRyxNQUFOLEdBQWUsQ0FBNUIsRUFBK0JELENBQUMsSUFBSSxDQUFwQyxFQUF1Q0EsQ0FBQyxFQUF4QyxFQUE0QztBQUMxQyxRQUFNRSxJQUFJLEdBQUdKLEtBQUssQ0FBQ0UsQ0FBRCxDQUFsQjs7QUFFQSxRQUFJRCxTQUFTLENBQUNJLElBQVYsQ0FBZUwsS0FBZixFQUFzQkksSUFBdEIsQ0FBSixFQUFpQztBQUMvQixhQUFPQSxJQUFQO0FBQ0Q7QUFDRjtBQUNGOztBQUVjO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNiLGlCQUFNO0F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ICBhY3Rpdml0eS5mcm9tLnJvbGUgPSAndXNlcic7XG4gICAgICAgIH0gZWxzZSBpZiAoYWN0aXZpdHkuZnJvbS5pZCkge1xuICAgICAgICAgIGFjdGl2aXR5LmZyb20ucm9sZSA9ICdib3QnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGFjdGl2aXR5LmZyb20ucm9sZSA9ICdjaGFubmVsJztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB5aWVsZCBwdXQoaW5jb21pbmdBY3Rpdml0eShhY3Rpdml0eSkpO1xuXG4gICAgICAvLyBVcGRhdGUgc3VnZ2VzdGVkIGFjdGlvbnNcbiAgICAgIGNvbnN0IGFjdGl2aXRpZXMgPSB5aWVsZCBzZWxlY3QoKHsgYWN0aXZpdGllcyB9KSA9PiBhY3Rpdml0aWVzKTtcbiAgICAgIGNvbnN0IGxhc3RNZXNzYWdlQWN0aXZpdHkgPSBsYXN0KGFjdGl2aXRpZXMsICh7IHR5cGUgfSkgPT4gdHlwZSA9PT0gJ21lc3NhZ2UnKTtcblxuICAgICAgaWYgKFxuICAgICAgICBsYXN0TWVzc2FnZUFjdGl2aXR5XG4gICAgICAgICYmIGxhc3RNZXNzYWdlQWN0aXZpdHkuZnJvbVxuICAgICAgICAmJiBsYXN0TWVzc2FnZUFjdGl2aXR5LmZyb20ucm9sZSA9PT0gJ2JvdCdcbiAgICAgICkge1xuICAgICAgICBjb25zdCB7IHN1Z2dlc3RlZEFjdGlvbnM6IHsgYWN0aW9ucyB9ID0ge30gfSA9IGxhc3RNZXNzYWdlQWN0aXZpdHk7XG5cbiAgICAgICAgeWllbGQgcHV0KHNldFN1Z2dlc3RlZEFjdGlvbnMoYWN0aW9ucykpO1xuICAgICAgfVxuICAgIH0pO1xuICB9KTtcbn1cbiJdfQ== |
{ | ||
"name": "botframework-webchat-core", | ||
"version": "4.1.1-master.688120d", | ||
"version": "4.1.1-master.6bc279f", | ||
"description": "Core of botframework-webchat", | ||
@@ -20,8 +20,10 @@ "main": "lib/index.js", | ||
"scripts": { | ||
"build": "concurrently --names \"babel,typecheck\" \"npm run build:babel\" \"npm run build:typecheck\"", | ||
"build": "npm run build:typecheck && npm run build:babel-instrumented", | ||
"build:babel": "babel --extensions .js,.ts,.tsx --ignore **/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.test.js,**/*.test.ts,**/*.test.tsx,__test__/**/*.js,__test__/**/*.ts,__test__/**/*.tsx --out-dir lib --source-maps inline --verbose src", | ||
"build:babel-instrumented": "npm run build:babel -- --env-name test", | ||
"build:typecheck": "tsc", | ||
"clean": "rimraf lib", | ||
"prepublishOnly": "npm run build:typecheck && npm run build:babel", | ||
"test": "jest", | ||
"watch": "concurrently --names \"babel,typecheck\" \"npm run build:babel -- --watch\" \"npm run build:typecheck -- --preserveWatchOutput --watch\"" | ||
"watch": "concurrently --names \"babel,typecheck\" \"npm run build:babel-instrumented -- --watch\" \"npm run build:typecheck -- --preserveWatchOutput --watch\"" | ||
}, | ||
@@ -50,2 +52,3 @@ "jest": { | ||
"babel-jest": "^23.6.0", | ||
"babel-plugin-istanbul": "^5.1.0", | ||
"babel-plugin-version-transform": "^1.0.0", | ||
@@ -52,0 +55,0 @@ "botframework-directlinejs": "^0.10.0", |
@@ -16,4 +16,4 @@ import { applyMiddleware, createStore, Store } from 'redux'; | ||
applyMiddleware( | ||
sagaMiddleware, | ||
...middlewares | ||
...middlewares, | ||
sagaMiddleware | ||
) | ||
@@ -20,0 +20,0 @@ ); |
@@ -28,7 +28,11 @@ import { | ||
// Patch activity.from.role to make sure its either "bot", "user", or "channel" | ||
if (!activity.from.role) { | ||
if (!activity.from) { | ||
activity.from = { role: 'channel' }; | ||
} else if (!activity.from.role) { | ||
if (activity.from.id === userID) { | ||
activity.from.role = 'user'; | ||
} else if (activity.from.id) { | ||
activity.from.role = 'bot'; | ||
} else { | ||
activity.from.role = 'bot'; | ||
activity.from.role = 'channel'; | ||
} | ||
@@ -43,3 +47,7 @@ } | ||
if (lastMessageActivity.from.role === 'bot') { | ||
if ( | ||
lastMessageActivity | ||
&& lastMessageActivity.from | ||
&& lastMessageActivity.from.role === 'bot' | ||
) { | ||
const { suggestedActions: { actions } = {} } = lastMessageActivity; | ||
@@ -46,0 +54,0 @@ |
Sorry, the diff of this file is not supported yet
280645
4253
17