Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

botframework-webchat-core

Package Overview
Dependencies
Maintainers
1
Versions
370
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botframework-webchat-core - npm Package Compare versions

Comparing version 4.2.1-master.d9808ca to 4.2.1-master.da98602

lib/actions/sendEvent.js

18

lib/actions/connect.js

@@ -7,5 +7,9 @@ "use strict";

exports.default = _default;
exports.CONNECT_FULFILLED = exports.CONNECT_REJECTED = exports.CONNECT_PENDING = exports.CONNECT = void 0;
exports.CONNECT_STILL_PENDING = exports.CONNECT_REJECTED = exports.CONNECT_PENDING = exports.CONNECT_FULFILLING = exports.CONNECT_FULFILLED = exports.CONNECT = void 0;
var CONNECT = 'DIRECT_LINE/CONNECT';
exports.CONNECT = CONNECT;
var CONNECT_FULFILLED = "".concat(CONNECT, "_FULFILLED");
exports.CONNECT_FULFILLED = CONNECT_FULFILLED;
var CONNECT_FULFILLING = "".concat(CONNECT, "_FULFILLING");
exports.CONNECT_FULFILLING = CONNECT_FULFILLING;
var CONNECT_PENDING = "".concat(CONNECT, "_PENDING");

@@ -15,8 +19,9 @@ exports.CONNECT_PENDING = CONNECT_PENDING;

exports.CONNECT_REJECTED = CONNECT_REJECTED;
var CONNECT_FULFILLED = "".concat(CONNECT, "_FULFILLED");
exports.CONNECT_FULFILLED = CONNECT_FULFILLED;
var CONNECT_STILL_PENDING = "".concat(CONNECT, "_STILL_PENDING");
exports.CONNECT_STILL_PENDING = CONNECT_STILL_PENDING;
function _default(_ref) {
var directLine = _ref.directLine,
userID = _ref.userID;
userID = _ref.userID,
username = _ref.username;
return {

@@ -26,6 +31,7 @@ type: CONNECT,

directLine: directLine,
userID: userID
userID: userID,
username: username
}
};
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL2Nvbm5lY3Q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xNQUFBQSxNQUFNLEVBQU5BLE1BRk87QUFHUEMsTUFBQUEsUUFBUSxFQUFSQTtBQUhPO0FBRkosR0FBUDtBQVFEIiwic291cmNlc0NvbnRlbnQiOlsiY29uc3QgQ09OTkVDVCA9ICdESVJFQ1RfTElORS9DT05ORUNUJztcbmNvbnN0IENPTk5FQ1RfRlVMRklMTEVEID0gYCR7IENPTk5FQ1QgfV9GVUxGSUxMRURgO1xuY29uc3QgQ09OTkVDVF9GVUxGSUxMSU5HID0gYCR7IENPTk5FQ1QgfV9GVUxGSUxMSU5HYDtcbmNvbnN0IENPTk5FQ1RfUEVORElORyA9IGAkeyBDT05ORUNUIH1fUEVORElOR2A7XG5jb25zdCBDT05ORUNUX1JFSkVDVEVEID0gYCR7IENPTk5FQ1QgfV9SRUpFQ1RFRGA7XG5jb25zdCBDT05ORUNUX1NUSUxMX1BFTkRJTkcgPSBgJHsgQ09OTkVDVCB9X1NUSUxMX1BFTkRJTkdgO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiAoeyBkaXJlY3RMaW5lLCB1c2VySUQsIHVzZXJuYW1lIH0pIHtcbiAgcmV0dXJuIHtcbiAgICB0eXBlOiBDT05ORUNULFxuICAgIHBheWxvYWQ6IHtcbiAgICAgIGRpcmVjdExpbmUsXG4gICAgICB1c2VySUQsXG4gICAgICB1c2VybmFtZVxuICAgIH1cbiAgfTtcbn1cblxuZXhwb3J0IHtcbiAgQ09OTkVDVCxcbiAgQ09OTkVDVF9GVUxGSUxMRUQsXG4gIENPTk5FQ1RfRlVMRklMTElORyxcbiAgQ09OTkVDVF9QRU5ESU5HLFxuICBDT05ORUNUX1JFSkVDVEVELFxuICBDT05ORUNUX1NUSUxMX1BFTkRJTkdcbn1cbiJdfQ==

@@ -21,4 +21,8 @@ "use strict";

function _default(activity) {
var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'keyboard';
return {
type: POST_ACTIVITY,
meta: {
method: method
},
payload: {

@@ -29,2 +33,2 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 -11,11 +11,11 @@ "use strict";

function sendMessage(text, via) {
function sendMessage(text, method) {
return {
type: SEND_MESSAGE,
payload: {
text: text,
via: via
method: method,
text: text
}
};
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3NlbmRNZXNzYWdlLmpzIl0sIm5hbWVzIjpbIlNFTkRfTUVTU0FHRSIsInNlbmRNZXNzYWdlIiwidGV4dCIsInZpYSIsInR5cGUiLCJwYXlsb2FkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsSUFBTUEsWUFBWSxHQUFHLHVCQUFyQjs7O0FBRWUsU0FBU0MsV0FBVCxDQUFxQkMsSUFBckIsRUFBMkJDLEdBQTNCLEVBQWdDO0FBQzdDLFNBQU87QUFDTEMsSUFBQUEsSUFBSSxFQUFFSixZQUREO0FBRUxLLElBQUFBLE9BQU8sRUFBRTtBQUFFSCxNQUFBQSxJQUFJLEVBQUpBLElBQUY7QUFBUUMsTUFBQUEsR0FBRyxFQUFIQTtBQUFSO0FBRkosR0FBUDtBQUlEIiwic291cmNlc0NvbnRlbnQiOlsiY29uc3QgU0VORF9NRVNTQUdFID0gJ1dFQl9DSEFUL1NFTkRfTUVTU0FHRSc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIHNlbmRNZXNzYWdlKHRleHQsIHZpYSkge1xuICByZXR1cm4ge1xuICAgIHR5cGU6IFNFTkRfTUVTU0FHRSxcbiAgICBwYXlsb2FkOiB7IHRleHQsIHZpYSB9XG4gIH07XG59XG5cbmV4cG9ydCB7IFNFTkRfTUVTU0FHRSB9XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3NlbmRNZXNzYWdlLmpzIl0sIm5hbWVzIjpbIlNFTkRfTUVTU0FHRSIsInNlbmRNZXNzYWdlIiwidGV4dCIsIm1ldGhvZCIsInR5cGUiLCJwYXlsb2FkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsSUFBTUEsWUFBWSxHQUFHLHVCQUFyQjs7O0FBRWUsU0FBU0MsV0FBVCxDQUFxQkMsSUFBckIsRUFBMkJDLE1BQTNCLEVBQW1DO0FBQ2hELFNBQU87QUFDTEMsSUFBQUEsSUFBSSxFQUFFSixZQUREO0FBRUxLLElBQUFBLE9BQU8sRUFBRTtBQUFFRixNQUFBQSxNQUFNLEVBQU5BLE1BQUY7QUFBVUQsTUFBQUEsSUFBSSxFQUFKQTtBQUFWO0FBRkosR0FBUDtBQUlEIiwic291cmNlc0NvbnRlbnQiOlsiY29uc3QgU0VORF9NRVNTQUdFID0gJ1dFQl9DSEFUL1NFTkRfTUVTU0FHRSc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIHNlbmRNZXNzYWdlKHRleHQsIG1ldGhvZCkge1xuICByZXR1cm4ge1xuICAgIHR5cGU6IFNFTkRfTUVTU0FHRSxcbiAgICBwYXlsb2FkOiB7IG1ldGhvZCwgdGV4dCB9XG4gIH07XG59XG5cbmV4cG9ydCB7IFNFTkRfTUVTU0FHRSB9XG4iXX0=

@@ -11,11 +11,10 @@ "use strict";

function _default(text, via) {
function _default(text) {
return {
type: SET_SEND_BOX,
payload: {
text: text,
via: via
text: text
}
};
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3NldFNlbmRCb3guanMiXSwibmFtZXMiOlsiU0VUX1NFTkRfQk9YIiwidGV4dCIsInZpYSIsInR5cGUiLCJwYXlsb2FkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsSUFBTUEsWUFBWSxHQUFHLHVCQUFyQjs7O0FBRWUsa0JBQVVDLElBQVYsRUFBZ0JDLEdBQWhCLEVBQXFCO0FBQ2x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b2FkOiB7IHRleHQgfVxuICB9O1xufVxuXG5leHBvcnQgeyBTRVRfU0VORF9CT1ggfVxuIl19

@@ -8,2 +8,3 @@ "use strict";

exports.SET_SEND_TYPING = void 0;
// TODO: [P3] Take this deprecation code out when releasing on or after 2020 January 13
var SET_SEND_TYPING = 'WEB_CHAT/SET_SEND_TYPING';

@@ -13,2 +14,3 @@ exports.SET_SEND_TYPING = SET_SEND_TYPING;

function _default(value) {
// Deprecation notes added to reducer
return {

@@ -21,2 +23,2 @@ type: SET_SEND_TYPING,

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3NldFNlbmRUeXBpbmcuanMiXSwibmFtZXMiOlsiU0VUX1NFTkRfVFlQSU5HIiwidmFsdWUiLCJ0eXBlIiwicGF5bG9hZCIsInNlbmRUeXBpbmciXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQSxJQUFNQSxlQUFlLEdBQUcsMEJBQXhCOzs7QUFFZSxrQkFBVUMsS0FBVixFQUFpQjtBQUM5QixTQUFPO0FBQ0xDLElBQUFBLElBQUksRUFBRUYsZUFERDtBQUVMRyxJQUFBQSxPQUFPLEVBQUU7QUFBRUMsTUFBQUEsVUFBVSxFQUFFLENBQUMsQ0FBQ0g7QUFBaEI7QUFGSixHQUFQO0FBSUQiLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCBTRVRfU0VORF9UWVBJTkcgPSAnV0VCX0NIQVQvU0VUX1NFTkRfVFlQSU5HJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gKHZhbHVlKSB7XG4gIHJldHVybiB7XG4gICAgdHlwZTogU0VUX1NFTkRfVFlQSU5HLFxuICAgIHBheWxvYWQ6IHsgc2VuZFR5cGluZzogISF2YWx1ZSB9XG4gIH07XG59XG5cbmV4cG9ydCB7IFNFVF9TRU5EX1RZUElORyB9XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3NldFNlbmRUeXBpbmcuanMiXSwibmFtZXMiOlsiU0VUX1NFTkRfVFlQSU5HIiwidmFsdWUiLCJ0eXBlIiwicGF5bG9hZCIsInNlbmRUeXBpbmciXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTtBQUNBLElBQU1BLGVBQWUsR0FBRywwQkFBeEI7OztBQUVlLGtCQUFVQyxLQUFWLEVBQWlCO0FBQzlCO0FBQ0EsU0FBTztBQUNMQyxJQUFBQSxJQUFJLEVBQUVGLGVBREQ7QUFFTEcsSUFBQUEsT0FBTyxFQUFFO0FBQUVDLE1BQUFBLFVBQVUsRUFBRSxDQUFDLENBQUNIO0FBQWhCO0FBRkosR0FBUDtBQUlEIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogW1AzXSBUYWtlIHRoaXMgZGVwcmVjYXRpb24gY29kZSBvdXQgd2hlbiByZWxlYXNpbmcgb24gb3IgYWZ0ZXIgMjAyMCBKYW51YXJ5IDEzXG5jb25zdCBTRVRfU0VORF9UWVBJTkcgPSAnV0VCX0NIQVQvU0VUX1NFTkRfVFlQSU5HJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gKHZhbHVlKSB7XG4gIC8vIERlcHJlY2F0aW9uIG5vdGVzIGFkZGVkIHRvIHJlZHVjZXJcbiAgcmV0dXJuIHtcbiAgICB0eXBlOiBTRVRfU0VORF9UWVBJTkcsXG4gICAgcGF5bG9hZDogeyBzZW5kVHlwaW5nOiAhIXZhbHVlIH1cbiAgfTtcbn1cblxuZXhwb3J0IHsgU0VUX1NFTkRfVFlQSU5HIH1cbiJdfQ==

@@ -11,10 +11,11 @@ "use strict";

function submitSendBox(via) {
function submitSendBox() {
var method = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'keyboard';
return {
type: SUBMIT_SEND_BOX,
payload: {
via: via
method: method
}
};
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3N1Ym1pdFNlbmRCb3guanMiXSwibmFtZXMiOlsiU1VCTUlUX1NFTkRfQk9YIiwic3VibWl0U2VuZEJveCIsInZpYSIsInR5cGUiLCJwYXlsb2FkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsSUFBTUEsZUFBZSxHQUFHLDBCQUF4Qjs7O0FBRWUsU0FBU0MsYUFBVCxDQUF1QkMsR0FBdkIsRUFBNEI7QUFDekMsU0FBTztBQUNMQyxJQUFBQSxJQUFJLEVBQUVILGVBREQ7QUFFTEksSUFBQUEsT0FBTyxFQUFFO0FBQUVGLE1BQUFBLEdBQUcsRUFBSEE7QUFBRjtBQUZKLEdBQVA7QUFJRCIsInNvdXJjZXNDb250ZW50IjpbImNvbnN0IFNVQk1JVF9TRU5EX0JPWCA9ICdXRUJfQ0hBVC9TVUJNSVRfU0VORF9CT1gnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBzdWJtaXRTZW5kQm94KHZpYSkge1xuICByZXR1cm4ge1xuICAgIHR5cGU6IFNVQk1JVF9TRU5EX0JPWCxcbiAgICBwYXlsb2FkOiB7IHZpYSB9XG4gIH07XG59XG5cbmV4cG9ydCB7IFNVQk1JVF9TRU5EX0JPWCB9XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3N1Ym1pdFNlbmRCb3guanMiXSwibmFtZXMiOlsiU1VCTUlUX1NFTkRfQk9YIiwic3VibWl0U2VuZEJveCIsIm1ldGhvZCIsInR5cGUiLCJwYXlsb2FkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsSUFBTUEsZUFBZSxHQUFHLDBCQUF4Qjs7O0FBRWUsU0FBU0MsYUFBVCxHQUE0QztBQUFBLE1BQXJCQyxNQUFxQix1RUFBWixVQUFZO0FBQ3pELFNBQU87QUFDTEMsSUFBQUEsSUFBSSxFQUFFSCxlQUREO0FBRUxJLElBQUFBLE9BQU8sRUFBRTtBQUFFRixNQUFBQSxNQUFNLEVBQU5BO0FBQUY7QUFGSixHQUFQO0FBSUQiLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCBTVUJNSVRfU0VORF9CT1ggPSAnV0VCX0NIQVQvU1VCTUlUX1NFTkRfQk9YJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gc3VibWl0U2VuZEJveChtZXRob2QgPSAna2V5Ym9hcmQnKSB7XG4gIHJldHVybiB7XG4gICAgdHlwZTogU1VCTUlUX1NFTkRfQk9YLFxuICAgIHBheWxvYWQ6IHsgbWV0aG9kIH1cbiAgfTtcbn1cblxuZXhwb3J0IHsgU1VCTUlUX1NFTkRfQk9YIH1cbiJdfQ==

@@ -40,2 +40,8 @@ "use strict";

});
Object.defineProperty(exports, "sendEvent", {
enumerable: true,
get: function get() {
return _sendEvent.default;
}
});
Object.defineProperty(exports, "sendFiles", {

@@ -53,2 +59,8 @@ enumerable: true,

});
Object.defineProperty(exports, "sendMessageBack", {
enumerable: true,
get: function get() {
return _sendMessageBack.default;
}
});
Object.defineProperty(exports, "sendPostBack", {

@@ -96,2 +108,8 @@ enumerable: true,

});
Object.defineProperty(exports, "setSendTypingIndicator", {
enumerable: true,
get: function get() {
return _setSendTypingIndicator.default;
}
});
Object.defineProperty(exports, "startDictate", {

@@ -139,2 +157,4 @@ enumerable: true,

var _sendEvent = _interopRequireDefault(require("./actions/sendEvent"));
var _sendFiles = _interopRequireDefault(require("./actions/sendFiles"));

@@ -144,2 +164,4 @@

var _sendMessageBack = _interopRequireDefault(require("./actions/sendMessageBack"));
var _sendPostBack = _interopRequireDefault(require("./actions/sendPostBack"));

@@ -159,2 +181,4 @@

var _setSendTypingIndicator = _interopRequireDefault(require("./actions/setSendTypingIndicator"));
var _startDictate = _interopRequireDefault(require("./actions/startDictate"));

@@ -179,4 +203,4 @@

exports.Constants = Constants;
var version = "4.2.1-master.d9808ca";
var version = "4.2.1-master.da98602";
exports.version = version;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJDb25zdGFudHMiLCJBY3Rpdml0eUNsaWVudFN0YXRlIiwiRGljdGF0ZVN0YXRlIiwidmVyc2lvbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFFQTs7QUFDQTs7QUFFQSxJQUFNQSxTQUFTLEdBQUc7QUFBRUMsRUFBQUEsbUJBQW1CLEVBQW5CQSxtQkFBRjtBQUF1QkMsRUFBQUEsWUFBWSxFQUFaQTtBQUF2QixDQUFsQjs7QUFDQSxJQUFNQyxPQUFPLHlCQUFiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbm5lY3QgZnJvbSAnLi9hY3Rpb25zL2Nvbm5lY3QnO1xuaW1wb3J0IGNyZWF0ZVN0b3JlIGZyb20gJy4vY3JlYXRlU3RvcmUnO1xuaW1wb3J0IGRpc2Nvbm5lY3QgZnJvbSAnLi9hY3Rpb25zL2Rpc2Nvbm5lY3Q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YW51YXJ5IDEzIDIwMjAgXG4gIHNldFNlbmRUeXBpbmdcbn1cbiJdfQ==
declare const _default: import("redux").Reducer<{
activities: {};
connectivityStatus: {};
dictateInterims: {};

@@ -10,4 +11,6 @@ dictateState: {};

sendTimeout: {};
sendTypingIndicator: {};
suggestedActions: {};
sendTyping: {};
}, import("redux").AnyAction>;
export default _default;

@@ -14,2 +14,4 @@ "use strict";

var _connectivityStatus = _interopRequireDefault(require("./reducers/connectivityStatus"));
var _dictateInterims = _interopRequireDefault(require("./reducers/dictateInterims"));

@@ -29,2 +31,4 @@

var _sendTypingIndicator = _interopRequireDefault(require("./reducers/sendTypingIndicator"));
var _suggestedActions = _interopRequireDefault(require("./reducers/suggestedActions"));

@@ -34,2 +38,3 @@

activities: _activities.default,
connectivityStatus: _connectivityStatus.default,
dictateInterims: _dictateInterims.default,

@@ -42,6 +47,9 @@ dictateState: _dictateState.default,

sendTimeout: _sendTimeout.default,
suggestedActions: _suggestedActions.default
sendTypingIndicator: _sendTypingIndicator.default,
suggestedActions: _suggestedActions.default,
// TODO: [P3] Take this deprecation code out when releasing on or after January 13 2020
sendTyping: _sendTypingIndicator.default
});
exports.default = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9yZWR1Y2VyLnRzIl0sIm5hbWVzIjpbImFjdGl2aXRpZXMiLCJkaWN0YXRlSW50ZXJpbXMiLCJkaWN0YXRlU3RhdGUiLCJsYW5ndWFnZSIsInJlYWR5U3RhdGUiLCJyZWZlcmVuY2VHcmFtbWFySUQiLCJzZW5kQm94VmFsdWUiLCJzZW5kVGltZW91dCIsInN1Z2dlc3RlZEFjdGlvbnMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBOztBQUVBOztBQUNBOztBQUNBOztBQUNBOztBQUNBOztBQUNBOztBQUNBOztBQUNBOztBQUNBOztlQUVlLDRCQUFnQjtBQUM3QkEsRUFBQUEsVUF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L3JlZHVjZXJzL3NlbmRUaW1lb3V0JztcbmltcG9ydCBzZW5kVHlwaW5nSW5kaWNhdG9yIGZyb20gJy4vcmVkdWNlcnMvc2VuZFR5cGluZ0luZGljYXRvcic7XG5pbXBvcnQgc3VnZ2VzdGVkQWN0aW9ucyBmcm9tICcuL3JlZHVjZXJzL3N1Z2dlc3RlZEFjdGlvbnMnO1xuXG5leHBvcnQgZGVmYXVsdCBjb21iaW5lUmVkdWNlcnMoe1xuICBhY3Rpdml0aWVzLFxuICBjb25uZWN0aXZpdHlTdGF0dXMsXG4gIGRpY3RhdGVJbnRlcmltcyxcbiAgZGljdGF0ZVN0YXRlLFxuICBsYW5ndWFnZSxcbiAgcmVhZHlTdGF0ZSxcbiAgcmVmZXJlbmNlR3JhbW1hcklELFxuICBzZW5kQm94VmFsdWUsXG4gIHNlbmRUaW1lb3V0LFxuICBzZW5kVHlwaW5nSW5kaWNhdG9yLFxuICBzdWdnZXN0ZWRBY3Rpb25zLFxuXG4gIC8vIFRPRE86IFtQM10gVGFrZSB0aGlzIGRlcHJlY2F0aW9uIGNvZGUgb3V0IHdoZW4gcmVsZWFzaW5nIG9uIG9yIGFmdGVyIEphbnVhcnkgMTMgMjAyMFxuICBzZW5kVHlwaW5nOiBzZW5kVHlwaW5nSW5kaWNhdG9yXG59KVxuIl19

@@ -43,3 +43,10 @@ "use strict";

_nextActivity$from = _nextActivity$from === void 0 ? {} : _nextActivity$from;
var nextFromID = _nextActivity$from.id;
var nextFromID = _nextActivity$from.id,
nextFromRole = _nextActivity$from.role,
nextType = nextActivity.type;
if (nextType === 'typing' && nextFromRole === 'user') {
return activities;
}
var nextTimestamp = Date.parse(nextActivity.timestamp);

@@ -138,2 +145,2 @@ var nextActivities = activities.filter(function (_ref2) {

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZWR1Y2Vycy9hY3Rpdml0aWVzLmpzIl0sIm5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d2UgaWdub3JlIGR1cGxpY2F0ZWQgYWN0aXZpdHkgSURcbiAgICAgIGlmICghfnN0YXRlLmZpbmRJbmRleCgoeyBpZCB9KSA9PiBpZCA9PT0gcGF5bG9hZC5hY3Rpdml0eS5pZCkpIHtcbiAgICAgICAgc3RhdGUgPSB1cHNlcnRBY3Rpdml0eVdpdGhTb3J0KHN0YXRlLCBwYXlsb2FkLmFjdGl2aXR5KTtcbiAgICAgIH1cblxuICAgICAgYnJlYWs7XG5cbiAgICBkZWZhdWx0OiBicmVhaztcbiAgfVxuXG4gIHJldHVybiBzdGF0ZTtcbn1cbiJdfQ==

@@ -20,10 +20,18 @@ "use strict";

var _detectSlowConnectionSaga = _interopRequireDefault(require("./sagas/detectSlowConnectionSaga"));
var _incomingActivitySaga = _interopRequireDefault(require("./sagas/incomingActivitySaga"));
var _incomingTypingSaga = _interopRequireDefault(require("./sagas/incomingTypingSaga"));
var _markActivityForSpeakOnIncomingActivityFromOthersSaga = _interopRequireDefault(require("./sagas/markActivityForSpeakOnIncomingActivityFromOthersSaga"));
var _markActivityForSpeakSaga = _interopRequireDefault(require("./sagas/markActivityForSpeakSaga"));
var _markAllAsSpokenOnStopSpeakActivitySaga = _interopRequireDefault(require("./sagas/markAllAsSpokenOnStopSpeakActivitySaga"));
var _postActivitySaga = _interopRequireDefault(require("./sagas/postActivitySaga"));
var _removeIncomingTypingAfterIntervalSaga = _interopRequireDefault(require("./sagas/removeIncomingTypingAfterIntervalSaga"));
var _sendConversationUpdateOnConnectSaga = _interopRequireDefault(require("./sagas/sendConversationUpdateOnConnectSaga"));
var _sendEventToPostActivitySaga = _interopRequireDefault(require("./sagas/sendEventToPostActivitySaga"));
var _sendFilesToPostActivitySaga = _interopRequireDefault(require("./sagas/sendFilesToPostActivitySaga"));

@@ -33,12 +41,16 @@

var _sendMessageBackToPostActivitySaga = _interopRequireDefault(require("./sagas/sendMessageBackToPostActivitySaga"));
var _sendPostBackToPostActivitySaga = _interopRequireDefault(require("./sagas/sendPostBackToPostActivitySaga"));
var _sendTypingOnSetSendBoxSaga = _interopRequireDefault(require("./sagas/sendTypingOnSetSendBoxSaga"));
var _sendTypingIndicatorOnSetSendBoxSaga = _interopRequireDefault(require("./sagas/sendTypingIndicatorOnSetSendBoxSaga"));
var _startDictateAfterSpeakActivitySaga = _interopRequireDefault(require("./sagas/startDictateAfterSpeakActivitySaga"));
var _stopDictateOnCardAction = _interopRequireDefault(require("./sagas/stopDictateOnCardAction"));
var _startSpeakActivityOnPostActivitySaga = _interopRequireDefault(require("./sagas/startSpeakActivityOnPostActivitySaga"));
var _stopSpeakActivityOnInputSaga = _interopRequireDefault(require("./sagas/stopSpeakActivityOnInputSaga"));
var _stopDictateOnCardActionSaga = _interopRequireDefault(require("./sagas/stopDictateOnCardActionSaga"));
var _stopSpeakingActivityOnInputSaga = _interopRequireDefault(require("./sagas/stopSpeakingActivityOnInputSaga"));
var _submitSendBoxSaga = _interopRequireDefault(require("./sagas/submitSendBoxSaga"));

@@ -68,49 +80,73 @@

_context.next = 8;
return (0, _effects.fork)(_incomingActivitySaga.default);
return (0, _effects.fork)(_detectSlowConnectionSaga.default);
case 8:
_context.next = 10;
return (0, _effects.fork)(_incomingTypingSaga.default);
return (0, _effects.fork)(_incomingActivitySaga.default);
case 10:
_context.next = 12;
return (0, _effects.fork)(_markActivityForSpeakSaga.default);
return (0, _effects.fork)(_markActivityForSpeakOnIncomingActivityFromOthersSaga.default);
case 12:
_context.next = 14;
return (0, _effects.fork)(_postActivitySaga.default);
return (0, _effects.fork)(_markAllAsSpokenOnStopSpeakActivitySaga.default);
case 14:
_context.next = 16;
return (0, _effects.fork)(_sendFilesToPostActivitySaga.default);
return (0, _effects.fork)(_postActivitySaga.default);
case 16:
_context.next = 18;
return (0, _effects.fork)(_sendMessageToPostActivitySaga.default);
return (0, _effects.fork)(_removeIncomingTypingAfterIntervalSaga.default);
case 18:
_context.next = 20;
return (0, _effects.fork)(_sendPostBackToPostActivitySaga.default);
return (0, _effects.fork)(_sendConversationUpdateOnConnectSaga.default);
case 20:
_context.next = 22;
return (0, _effects.fork)(_sendTypingOnSetSendBoxSaga.default);
return (0, _effects.fork)(_sendEventToPostActivitySaga.default);
case 22:
_context.next = 24;
return (0, _effects.fork)(_startDictateAfterSpeakActivitySaga.default);
return (0, _effects.fork)(_sendFilesToPostActivitySaga.default);
case 24:
_context.next = 26;
return (0, _effects.fork)(_stopDictateOnCardAction.default);
return (0, _effects.fork)(_sendMessageToPostActivitySaga.default);
case 26:
_context.next = 28;
return (0, _effects.fork)(_stopSpeakActivityOnInputSaga.default);
return (0, _effects.fork)(_sendMessageBackToPostActivitySaga.default);
case 28:
_context.next = 30;
return (0, _effects.fork)(_sendPostBackToPostActivitySaga.default);
case 30:
_context.next = 32;
return (0, _effects.fork)(_sendTypingIndicatorOnSetSendBoxSaga.default);
case 32:
_context.next = 34;
return (0, _effects.fork)(_startDictateAfterSpeakActivitySaga.default);
case 34:
_context.next = 36;
return (0, _effects.fork)(_startSpeakActivityOnPostActivitySaga.default);
case 36:
_context.next = 38;
return (0, _effects.fork)(_stopDictateOnCardActionSaga.default);
case 38:
_context.next = 40;
return (0, _effects.fork)(_stopSpeakingActivityOnInputSaga.default);
case 40:
_context.next = 42;
return (0, _effects.fork)(_submitSendBoxSaga.default);
case 30:
case 42:
case "end":

@@ -122,2 +158,2 @@ return _context.stop();

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9zYWdhcy5qcyJdLCJuYW1lcyI6WyJjbGVhclN1Z2dlc3RlZEFjdGlvbnNPblBvc3RBY3Rpdml0eVNhZ2EiLCJjb25uZWN0aW9uU3RhdHVzVXBkYXRlU2FnYSIsImNvbm5lY3RTYWdhIiwiaW5jb21pbmdBY3Rpdml0eVNhZ2EiLCJpbmNvbWluZ1R5cGluZ1NhZ2EiLCJtYXJrQWN0aXZpdHlGb3JTcGVha1NhZ2EiLCJwb3N0QWN0a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lckludGVydmFsU2FnYSk7XG4gIHlpZWxkIGZvcmsoc2VuZENvbnZlcnNhdGlvblVwZGF0ZU9uQ29ubmVjdFNhZ2EpO1xuICB5aWVsZCBmb3JrKHNlbmRFdmVudFRvUG9zdEFjdGl2aXR5U2FnYSk7XG4gIHlpZWxkIGZvcmsoc2VuZEZpbGVzVG9Qb3N0QWN0aXZpdHlTYWdhKTtcbiAgeWllbGQgZm9yayhzZW5kTWVzc2FnZVRvUG9zdEFjdGl2aXR5U2FnYSk7XG4gIHlpZWxkIGZvcmsoc2VuZE1lc3NhZ2VCYWNrVG9Qb3N0QWN0aXZpdHlTYWdhKTtcbiAgeWllbGQgZm9yayhzZW5kUG9zdEJhY2tUb1Bvc3RBY3Rpdml0eVNhZ2EpO1xuICB5aWVsZCBmb3JrKHNlbmRUeXBpbmdJbmRpY2F0b3JPblNldFNlbmRCb3hTYWdhKTtcbiAgeWllbGQgZm9yayhzdGFydERpY3RhdGVBZnRlclNwZWFrQWN0aXZpdHlTYWdhKTtcbiAgeWllbGQgZm9yayhzdGFydFNwZWFrQWN0aXZpdHlPblBvc3RBY3Rpdml0eVNhZ2EpO1xuICB5aWVsZCBmb3JrKHN0b3BEaWN0YXRlT25DYXJkQWN0aW9uU2FnYSk7XG4gIHlpZWxkIGZvcmsoc3RvcFNwZWFraW5nQWN0aXZpdHlPbklucHV0U2FnYSk7XG4gIHlpZWxkIGZvcmsoc3VibWl0U2VuZEJveFNhZ2EpO1xufVxuIl19

@@ -8,3 +8,3 @@ "use strict";

});
exports.default = _callee2;
exports.default = _callee;

@@ -15,6 +15,6 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));

var _whileConnected = _interopRequireDefault(require("./effects/whileConnected"));
var _postActivity = require("../actions/postActivity");
var _whileConnected = _interopRequireDefault(require("./effects/whileConnected"));
var _setSuggestedActions = _interopRequireDefault(require("../actions/setSuggestedActions"));

@@ -24,47 +24,61 @@

/*#__PURE__*/
_regenerator.default.mark(_callee2);
_regenerator.default.mark(_callee),
_marked2 =
/*#__PURE__*/
_regenerator.default.mark(clearSuggestedActionsOnPostActivity),
_marked3 =
/*#__PURE__*/
_regenerator.default.mark(clearSuggestedActions);
function _callee2() {
return _regenerator.default.wrap(function _callee2$(_context2) {
function _callee() {
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _whileConnected.default)(clearSuggestedActionsOnPostActivity);
case 2:
case "end":
return _context.stop();
}
}
}, _marked, this);
}
function clearSuggestedActionsOnPostActivity() {
return _regenerator.default.wrap(function clearSuggestedActionsOnPostActivity$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return (0, _whileConnected.default)(
/*#__PURE__*/
_regenerator.default.mark(function _callee() {
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _effects.take)(function (_ref) {
var payload = _ref.payload,
type = _ref.type;
return type === _postActivity.POST_ACTIVITY_PENDING && payload.activity.type === 'message';
});
return (0, _effects.takeEvery)(function (_ref) {
var payload = _ref.payload,
type = _ref.type;
return type === _postActivity.POST_ACTIVITY_PENDING && payload.activity.type === 'message';
}, clearSuggestedActions);
case 2:
_context.next = 4;
return (0, _effects.put)((0, _setSuggestedActions.default)());
case 2:
case "end":
return _context2.stop();
}
}
}, _marked2, this);
}
case 4:
_context.next = 0;
break;
function clearSuggestedActions() {
return _regenerator.default.wrap(function clearSuggestedActions$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return (0, _effects.put)((0, _setSuggestedActions.default)());
case 6:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
case 2:
case "end":
return _context2.stop();
return _context3.stop();
}
}
}, _marked, this);
}, _marked3, this);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9jbG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YWQuYWN0aXZpdHkudHlwZSA9PT0gJ21lc3NhZ2UnXG4gICAgKSxcbiAgICBjbGVhclN1Z2dlc3RlZEFjdGlvbnNcbiAgKTtcbn1cblxuZnVuY3Rpb24qIGNsZWFyU3VnZ2VzdGVkQWN0aW9ucygpIHtcbiAgeWllbGQgcHV0KHNldFN1Z2dlc3RlZEFjdGlvbnMoKSk7XG59XG4iXX0=

@@ -8,3 +8,3 @@ "use strict";

});
exports.default = _callee3;
exports.default = _callee;

@@ -25,13 +25,34 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));

/*#__PURE__*/
_regenerator.default.mark(_callee3);
_regenerator.default.mark(_callee),
_marked2 =
/*#__PURE__*/
_regenerator.default.mark(observeConnectionStatus);
function _callee3() {
return _regenerator.default.wrap(function _callee3$(_context3) {
function _callee() {
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _whileConnected.default)(observeConnectionStatus);
case 2:
case "end":
return _context.stop();
}
}
}, _marked, this);
}
function observeConnectionStatus(_ref) {
var directLine;
return _regenerator.default.wrap(function observeConnectionStatus$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return (0, _whileConnected.default)(
directLine = _ref.directLine;
_context3.next = 3;
return (0, _observeEach.default)(directLine.connectionStatus$,
/*#__PURE__*/
_regenerator.default.mark(function _callee2(directLine) {
_regenerator.default.mark(function _callee2(connectionStatus) {
return _regenerator.default.wrap(function _callee2$(_context2) {

@@ -42,25 +63,9 @@ while (1) {

_context2.next = 2;
return (0, _observeEach.default)(directLine.connectionStatus$,
/*#__PURE__*/
_regenerator.default.mark(function _callee(connectionStatus) {
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _effects.put)((0, _connectionStatusUpdate.default)(connectionStatus));
return (0, _effects.put)((0, _connectionStatusUpdate.default)(connectionStatus));
case 2:
_context.next = 4;
return (0, _effects.put)((0, _setReferenceGrammarID.default)(directLine.referenceGrammarId));
case 2:
_context2.next = 4;
return (0, _effects.put)((0, _setReferenceGrammarID.default)(directLine.referenceGrammarId));
case 4:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
case 2:
case 4:
case "end":

@@ -73,3 +78,3 @@ return _context2.stop();

case 2:
case 3:
case "end":

@@ -79,4 +84,4 @@ return _context3.stop();

}
}, _marked, this);
}, _marked2, this);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9jb25uZWN0aW9uU3RhdHVzVXBkYXRlU2FnYS5qcyJdLCJuYW1lcyI6WyJkaXJlY3RMaW5lIiwiY29ubmVjdGlvblN0YXR1cyQiLCJjb25uZWN0aW9uU3RhdHVzIiwicmVmZXJlbmNlR3JhbW1hcklkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBOztBQUlBOztBQUNBOztBQUVBOztBQUNBOzs7Ozs7QUFFZTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDYixpQkFBTTtBQUFBO0FBQUEsb0NBQWUsa0JBQVdBLFVBQVg7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ25CLDJCQUFNLDBCQUFZQSxVQUFVLENBQUNDLGlCQUF2QjtBQUFBO0FBQUEsOENBQTBDLGlCQUFXQyxnQkFBWDtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDOUMscUNBQU0sa0JBQUkscUNBQXVCQSxnQkFBdkIsQ0FBSixDQUFOOztBQUQ4QztBQUFBO0FBRTlDLHFDQUFNLGtCQUFJLG9DQUFzQkYsVUFBVSxDQUFDRyxrQkFBakMsQ0FBSixDQUFOOztBQUY4QztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQSxxQkFBMUMsRUFBTjs7QUFEbUI7QUFBQTtBQUFBO0FBQUE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Bmcm9tICcuL2VmZmVjdHMvd2hpbGVDb25uZWN0ZWQnO1xuXG5pbXBvcnQgY29ubmVjdGlvblN0YXR1c1VwZGF0ZSBmcm9tICcuLi9hY3Rpb25zL2Nvbm5lY3Rpb25TdGF0dXNVcGRhdGUnO1xuaW1wb3J0IHNldFJlZmVyZW5jZUdyYW1tYXJJRCBmcm9tICcuLi9hY3Rpb25zL3NldFJlZmVyZW5jZUdyYW1tYXJJRCc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKiAoKSB7XG4gIHlpZWxkIHdoaWxlQ29ubmVjdGVkKG9ic2VydmVDb25uZWN0aW9uU3RhdHVzKTtcbn1cblxuZnVuY3Rpb24qIG9ic2VydmVDb25uZWN0aW9uU3RhdHVzKHsgZGlyZWN0TGluZSB9KSB7XG4gIHlpZWxkIG9ic2VydmVFYWNoKGRpcmVjdExpbmUuY29ubmVjdGlvblN0YXR1cyQsIGZ1bmN0aW9uKiAoY29ubmVjdGlvblN0YXR1cykge1xuICAgIHlpZWxkIHB1dChjb25uZWN0aW9uU3RhdHVzVXBkYXRlKGNvbm5lY3Rpb25TdGF0dXMpKTtcbiAgICB5aWVsZCBwdXQoc2V0UmVmZXJlbmNlR3JhbW1hcklEKGRpcmVjdExpbmUucmVmZXJlbmNlR3JhbW1hcklkKSk7XG4gIH0pO1xufVxuIl19
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

@@ -16,8 +18,10 @@

var _callUntil = _interopRequireDefault(require("./effects/callUntil"));
var _mathRandom = _interopRequireDefault(require("math-random"));
var _forever = _interopRequireDefault(require("./effects/forever"));
var _updateConnectionStatus = _interopRequireWildcard(require("../actions/updateConnectionStatus"));
var _createPromiseQueue = _interopRequireDefault(require("../createPromiseQueue"));
var _botframeworkDirectlinejs = require("botframework-directlinejs");
var _connect = require("../actions/connect");

@@ -29,3 +33,3 @@

/*#__PURE__*/
_regenerator.default.mark(_callee),
_regenerator.default.mark(observeAndPutConnectionStatusUpdate),
_marked2 =

@@ -36,66 +40,45 @@ /*#__PURE__*/

/*#__PURE__*/
_regenerator.default.mark(disconnectSaga);
_regenerator.default.mark(_callee);
// const UNINITIALIZED = 0;
// const CONNECTING = 1;
var ONLINE = 2; // const EXPIRED_TOKEN = 3;
// const FAILED_TO_CONNECT = 4;
var CONNECTING = _botframeworkDirectlinejs.ConnectionStatus.Connecting,
ONLINE = _botframeworkDirectlinejs.ConnectionStatus.Online,
EXPIRED_TOKEN = _botframeworkDirectlinejs.ConnectionStatus.ExpiredToken,
FAILED_TO_CONNECT = _botframeworkDirectlinejs.ConnectionStatus.FailedToConnect,
ENDED = _botframeworkDirectlinejs.ConnectionStatus.Ended;
var ENDED = 5;
var DEFAULT_USER_ID = 'default-user';
function randomUserID() {
return "r_".concat((0, _mathRandom.default)().toString(36).substr(2, 10));
}
function _callee() {
var _ref, _ref$payload, directLine, userID, token, _ref2, userIDFromToken, connectTask;
return _regenerator.default.wrap(function _callee$(_context) {
function observeAndPutConnectionStatusUpdate(directLine) {
var connectionStatusQueue, connectionStatusSubscription, connectionStatus;
return _regenerator.default.wrap(function observeAndPutConnectionStatusUpdate$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _effects.take)(_connect.CONNECT);
connectionStatusQueue = (0, _createPromiseQueue.default)();
connectionStatusSubscription = directLine.connectionStatus$.subscribe({
next: connectionStatusQueue.push
});
_context.prev = 2;
case 2:
_ref = _context.sent;
_ref$payload = _ref.payload;
directLine = _ref$payload.directLine;
userID = _ref$payload.userID;
token = directLine.token;
_ref2 = (0, _jsonwebtoken.decode)(token) || {}, userIDFromToken = _ref2.user;
case 3:
_context.next = 5;
return (0, _effects.call)(connectionStatusQueue.shift);
if (userIDFromToken) {
if (userID && userID !== userIDFromToken) {
console.warn('Web Chat: user ID is both specified in the Direct Line token and passed in, will use the user ID from the token.');
}
case 5:
connectionStatus = _context.sent;
_context.next = 8;
return (0, _effects.put)((0, _updateConnectionStatus.default)(connectionStatus));
userID = userIDFromToken;
} else if (userID) {
if (typeof userID !== 'string') {
console.warn('Web Chat: user ID must be a string.');
userID = DEFAULT_USER_ID;
} else if (/^dl_/.test(userID)) {
console.warn('Web Chat: user ID prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.');
userID = DEFAULT_USER_ID;
}
} else {
// Only specify "default-user" if not found from token and not passed in
userID = DEFAULT_USER_ID;
}
case 8:
_context.next = 3;
break;
_context.next = 11;
return (0, _effects.fork)(connectSaga, directLine, userID);
case 10:
_context.prev = 10;
connectionStatusSubscription.unsubscribe();
return _context.finish(10);
case 11:
connectTask = _context.sent;
_context.next = 14;
return (0, _effects.take)(_disconnect.DISCONNECT);
case 14:
_context.next = 16;
return (0, _effects.call)(disconnectSaga, connectTask, directLine);
case 16:
_context.next = 0;
break;
case 18:
case 13:
case "end":

@@ -105,7 +88,45 @@ return _context.stop();

}
}, _marked, this);
}, _marked, this, [[2,, 10, 13]]);
}
function connectSaga(directLine, userID) {
var meta, connectionStatusQueue, connectionStatusSubscription, activitySubscription;
function negativeUpdateConnectionStatusAction(_ref) {
var payload = _ref.payload,
type = _ref.type;
if (type === _updateConnectionStatus.UPDATE_CONNECTION_STATUS) {
var connectionStatus = payload.connectionStatus;
return connectionStatus !== CONNECTING && connectionStatus !== ONLINE;
}
}
function rectifyUserID(directLine, userIDFromAction) {
var token = directLine.token;
var _ref2 = (0, _jsonwebtoken.decode)(token) || {},
userIDFromToken = _ref2.user;
if (userIDFromToken) {
if (userIDFromAction && userIDFromAction !== userIDFromToken) {
console.warn('Web Chat: user ID is both specified in the Direct Line token and passed in, will use the user ID from the token.');
}
return userIDFromToken;
} else if (userIDFromAction) {
if (typeof userIDFromAction !== 'string') {
console.warn('Web Chat: user ID must be a string.');
return randomUserID();
} else if (/^dl_/.test(userIDFromAction)) {
console.warn('Web Chat: user ID prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.');
return randomUserID();
}
} else {
return randomUserID();
}
return userIDFromAction;
}
function connectSaga(directLine) {
var activitySubscription, _ref3, connectionStatus;
return _regenerator.default.wrap(function connectSaga$(_context2) {

@@ -115,17 +136,3 @@ while (1) {

case 0:
meta = {
userID: userID
};
_context2.next = 3;
return (0, _effects.put)({
type: _connect.CONNECT_PENDING,
meta: meta
});
case 3:
connectionStatusQueue = (0, _createPromiseQueue.default)();
connectionStatusSubscription = directLine.connectionStatus$.subscribe({
next: connectionStatusQueue.push
}); // DirectLineJS start the connection only after the first subscriber for activity$, but not connectionStatus$
// DirectLineJS start the connection only after the first subscriber for activity$, but not connectionStatus$
activitySubscription = directLine.activity$.subscribe({

@@ -136,21 +143,32 @@ next: function next() {

});
_context2.prev = 6;
_context2.prev = 7;
_context2.next = 10;
return (0, _callUntil.default)(connectionStatusQueue.shift, [], function (connectionStatus) {
return connectionStatus === ONLINE;
_context2.prev = 1;
case 2:
_context2.next = 4;
return (0, _effects.take)(_updateConnectionStatus.UPDATE_CONNECTION_STATUS);
case 4:
_ref3 = _context2.sent;
connectionStatus = _ref3.payload.connectionStatus;
if (!(connectionStatus === ONLINE)) {
_context2.next = 10;
break;
}
return _context2.abrupt("return", function () {
activitySubscription.unsubscribe();
directLine.end();
});
case 10:
_context2.next = 12;
return (0, _effects.put)({
type: _connect.CONNECT_FULFILLED,
meta: meta,
payload: {
directLine: directLine
}
});
if (!(connectionStatus === ENDED || connectionStatus === EXPIRED_TOKEN || connectionStatus === FAILED_TO_CONNECT)) {
_context2.next = 12;
break;
}
throw new Error('Failed to connect');
case 12:
_context2.next = 18;
_context2.next = 2;
break;

@@ -160,48 +178,18 @@

_context2.prev = 14;
_context2.t0 = _context2["catch"](7);
_context2.next = 18;
return (0, _effects.put)({
type: _connect.CONNECT_REJECTED,
error: true,
meta: meta,
payload: _context2.t0
});
case 18:
_context2.prev = 18;
_context2.next = 21;
_context2.next = 17;
return (0, _effects.cancelled)();
case 21:
case 17:
if (!_context2.sent) {
_context2.next = 24;
_context2.next = 20;
break;
}
_context2.next = 24;
return (0, _effects.put)({
type: _connect.CONNECT_REJECTED,
error: true,
meta: meta,
payload: new Error('cancelled')
});
activitySubscription.unsubscribe();
throw new Error('Cancelled');
case 24:
return _context2.finish(18);
case 20:
return _context2.finish(14);
case 25:
_context2.next = 27;
return (0, _forever.default)();
case 27:
_context2.prev = 27;
// TODO: [P2] DirectLineJS should kill the connection when we unsubscribe
// But currently in v3, DirectLineJS does not have this functionality
// Thus, we need to call "end()" explicitly
directLine.end();
activitySubscription.unsubscribe();
connectionStatusSubscription.unsubscribe();
return _context2.finish(27);
case 32:
case 21:
case "end":

@@ -211,8 +199,9 @@ return _context2.stop();

}
}, _marked2, this, [[6,, 27, 32], [7, 14, 18, 25]]);
}, _marked2, this, [[1,, 14, 21]]);
}
function disconnectSaga(connectTask, directLine) {
var connectionStatusQueue, unsubscribe;
return _regenerator.default.wrap(function disconnectSaga$(_context3) {
function _callee() {
var _ref4, _ref4$payload, directLine, userIDFromAction, username, updateConnectionStatusTask, meta, endDirectLine, terminateAction;
return _regenerator.default.wrap(function _callee$(_context3) {
while (1) {

@@ -222,66 +211,118 @@ switch (_context3.prev = _context3.next) {

_context3.next = 2;
return (0, _effects.put)({
type: _disconnect.DISCONNECT_PENDING
});
return (0, _effects.take)(_connect.CONNECT);
case 2:
connectionStatusQueue = (0, _createPromiseQueue.default)();
unsubscribe = directLine.connectionStatus$.subscribe({
next: connectionStatusQueue.push
}); // DirectLineJS should cancel underlying REST/WS when we cancel
// the connect task, which subsequently unsubscribe connectionStatus$
_context3.next = 6;
return (0, _effects.cancel)(connectTask);
case 6:
_context3.prev = 6;
_ref4 = _context3.sent;
_ref4$payload = _ref4.payload;
directLine = _ref4$payload.directLine;
userIDFromAction = _ref4$payload.userID;
username = _ref4$payload.username;
_context3.next = 9;
return (0, _callUntil.default)(connectionStatusQueue.shift, [], function (connectionStatus) {
return connectionStatus === ENDED;
});
return (0, _effects.fork)(observeAndPutConnectionStatusUpdate, directLine);
case 9:
_context3.next = 11;
updateConnectionStatusTask = _context3.sent;
_context3.prev = 10;
meta = {
userID: rectifyUserID(directLine, userIDFromAction),
username: username
};
endDirectLine = void 0;
_context3.next = 15;
return (0, _effects.put)({
type: _disconnect.DISCONNECT_FULFILLED
type: _connect.CONNECT_PENDING,
meta: meta
});
case 11:
_context3.next = 17;
case 15:
_context3.prev = 15;
_context3.next = 18;
return (0, _effects.call)(connectSaga, directLine);
case 18:
endDirectLine = _context3.sent;
_context3.next = 26;
break;
case 13:
_context3.prev = 13;
_context3.t0 = _context3["catch"](6);
_context3.next = 17;
case 21:
_context3.prev = 21;
_context3.t0 = _context3["catch"](15);
_context3.next = 25;
return (0, _effects.put)({
type: _disconnect.DISCONNECT_REJECTED,
type: _connect.CONNECT_REJECTED,
error: true,
meta: meta,
payload: _context3.t0
});
case 17:
_context3.prev = 17;
_context3.next = 20;
return (0, _effects.cancelled)();
case 25:
return _context3.abrupt("continue", 49);
case 20:
if (!_context3.sent) {
_context3.next = 23;
case 26:
_context3.prev = 26;
_context3.next = 29;
return (0, _effects.put)({
type: _connect.CONNECT_FULFILLING,
meta: meta,
payload: {
directLine: directLine
}
});
case 29:
_context3.next = 31;
return (0, _effects.put)({
type: _connect.CONNECT_FULFILLED,
meta: meta,
payload: {
directLine: directLine
}
});
case 31:
_context3.next = 33;
return (0, _effects.take)([_disconnect.DISCONNECT, negativeUpdateConnectionStatusAction]);
case 33:
terminateAction = _context3.sent;
_context3.next = 36;
return (0, _effects.put)({
type: _disconnect.DISCONNECT_PENDING
});
case 36:
endDirectLine();
if (!(terminateAction.type === _disconnect.DISCONNECT)) {
_context3.next = 40;
break;
}
_context3.next = 23;
_context3.next = 40;
return (0, _effects.take)(negativeUpdateConnectionStatusAction);
case 40:
_context3.prev = 40;
_context3.next = 43;
return (0, _effects.put)({
type: _disconnect.DISCONNECT_REJECTED,
error: true,
payload: new Error('cancelled')
type: _disconnect.DISCONNECT_FULFILLED
});
case 23:
unsubscribe();
return _context3.finish(17);
case 43:
endDirectLine();
return _context3.finish(40);
case 25:
case 45:
_context3.prev = 45;
_context3.next = 48;
return (0, _effects.cancel)(updateConnectionStatusTask);
case 48:
return _context3.finish(45);
case 49:
_context3.next = 0;
break;
case 51:
case "end":

@@ -291,4 +332,4 @@ return _context3.stop();

}
}, _marked3, this, [[6, 13, 17, 25]]);
}, _marked3, this, [[10,, 45, 49], [15, 21], [26,, 40, 45]]);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9jb25uZWN0U2FnYS5qcyJdLCJuYW1lcyI6WyJjb25uZWN0U2FnYSIsImRpc2Nvbm5lY3RTYWdhIiwiT05MSU5FIiwiRU5ERUQiLCJERUZBVUxUX1VTRVJfSUQiLCJDT05ORUNUIiwicGF5bG9hZCIsImRpcmVjdExpbmUiLCJ1c2VySUQiLCJ0b2tlbiIsInVzZXJJREZyb21Ub2tlbiIsInVzZXIiLCJjb25zb2xlIiwid2FybiIsInRlc3QiLCJjb25uZWN0VGFzayIsIkRJU0NPTk5FQ1QiLCJtZXRhIiwidHlwZSIsIkNPTk5FQ1RfUEVORElORyIsImNvbm5lY3Rpb25TdGF0dXNRdWV1ZSIsImNvbm5lY3Rpb25TdGF0dXNTdWJzY3JpcHRpb24iLCJjb25uZWN0aW9uU3RhdHVzJCIsInN1YnNjcmliZSIsIm5leHQiLCJwdXNoIiwiYWN0aXZpdHlTdWJzY3JpcHRpb24iLCJhY3Rpdml0eSQiLCJzaGlmdCIsImNvbm5lY3Rpb25TdGF0dXMiLCJDT05ORUNUX0ZVTEZJTExFRCIsIkNPTk5FQ1RfUkVKRUNURUQiLCJlcnJvciIsIkVycm9yIiwiZW5kIiwidW5zdWJzY3JpYmUiLCJESVNDT05ORUNUX1BFTkRJTkciLCJESVNDT05ORUNUX0ZVTEZJTExFRCIsIkRJU0NPTk5FQ1RfUkVKRUNURUQ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JdfQ==

@@ -22,3 +22,3 @@ "use strict";

_regenerator.default.mark(function _callee() {
var _ref, userID, directLine, task;
var _ref, _ref$meta, userID, username, directLine, task;

@@ -30,25 +30,31 @@ return _regenerator.default.wrap(function _callee$(_context) {

_context.next = 2;
return (0, _effects.take)(_connect.CONNECT_FULFILLED);
return (0, _effects.take)(_connect.CONNECT_FULFILLING);
case 2:
_ref = _context.sent;
userID = _ref.meta.userID;
_ref$meta = _ref.meta;
userID = _ref$meta.userID;
username = _ref$meta.username;
directLine = _ref.payload.directLine;
_context.next = 7;
return (0, _effects.fork)(fn, directLine, userID);
_context.next = 9;
return (0, _effects.fork)(fn, {
directLine: directLine,
userID: userID,
username: username
});
case 7:
case 9:
task = _context.sent;
_context.next = 10;
return (0, _effects.take)(_disconnect.DISCONNECT_FULFILLED);
_context.next = 12;
return (0, _effects.take)(_disconnect.DISCONNECT_PENDING);
case 10:
_context.next = 12;
case 12:
_context.next = 14;
return (0, _effects.cancel)(task);
case 12:
case 14:
_context.next = 0;
break;
case 14:
case 16:
case "end":

@@ -61,2 +67,2 @@ return _context.stop();

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zYWdhcy9lZmZlY3RzL3doaWxlQ29ubmVjdGVkLmpzIl0sIm5hbWVzIjpbImZuIiwiQ09OTkVDVF9GVUxGSUxMRUQiLCJ1c2VySUQiLCJtZXRhIiwiZGlyZWN0TGluZSIsInBheWxvYWQiLCJ0YXNrIiwiRElTQ09OTkVDVF9GVUxGSUxMRUQiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUE7O0FBT0E7O0FBQ0E7O0FBRWUsa0JBQVVBLEVBQVYsRUFBYztBQUMzQixTQUFPO0FBQUE7QUFBQSw0QkFBSztBQUFBOztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFFOEMsbUJBQU0sbUJBQUtDLDBCQUFMLENBQU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O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBLEdBQUwsRUFBUDtBQVVEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtcbiAgY2FsbCxcbiAgY2FuY2VsLFxuICBmb3JrLFxuICB0YWtlXG59IGZyb20gJ3JlZHV4LXNhZ2EvZWZmZWN0cyc7XG5cbmltcG9ydCB7IENPTk5FQ1RfRlVMRklMTElORyB9IGZyb20gJy4uLy4uL2FjdGlvbnMvY29ubmVjdCc7XG5pbXBvcnQgeyBESVNDT05ORUNUX1BFTkRJTkcgfSBmcm9tICcuLi8uLi9hY3Rpb25zL2Rpc2Nvbm5lY3QnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiAoZm4pIHtcbiAgcmV0dXJuIGNhbGwoZnVuY3Rpb24qICgpIHtcbiAgICBmb3IgKDs7KSB7XG4gICAgICBjb25zdCB7IG1ldGE6IHsgdXNlcklELCB1c2VybmFtZSB9LCBwYXlsb2FkOiB7IGRpcmVjdExpbmUgfSB9ID0geWllbGQgdGFrZShDT05ORUNUX0ZVTEZJTExJTkcpO1xuICAgICAgY29uc3QgdGFzayA9IHlpZWxkIGZvcmsoZm4sIHsgZGlyZWN0TGluZSwgdXNlcklELCB1c2VybmFtZSB9KTtcblxuICAgICAgLy8gV2hlbiB3ZSByZWNlaXZlIERJU0NPTk5FQ1RfUEVORElORywgdGhlIERpcmVjdCBMaW5lIGNvbm5lY3Rpb24gaXMgdGVhcmluZyBkb3duIGFuZCBzaG91bGQgbm90IGJlIHVzZWQuXG4gICAgICB5aWVsZCB0YWtlKERJU0NPTk5FQ1RfUEVORElORyk7XG4gICAgICB5aWVsZCBjYW5jZWwodGFzayk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ==

@@ -8,10 +8,16 @@ "use strict";

});
exports.default = _callee3;
exports.default = _callee;
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
var _effects = require("redux-saga/effects");
var _simpleUpdateIn = _interopRequireDefault(require("simple-update-in"));
var _incomingActivity = _interopRequireDefault(require("../actions/incomingActivity"));
var _setSuggestedActions = _interopRequireDefault(require("../actions/setSuggestedActions"));
var _activityFromBot = _interopRequireDefault(require("../definitions/activityFromBot"));
var _observeEach = _interopRequireDefault(require("./effects/observeEach"));

@@ -21,29 +27,40 @@

var _incomingActivity = _interopRequireDefault(require("../actions/incomingActivity"));
var _activities = require("../selectors/activities");
var _setSuggestedActions = _interopRequireDefault(require("../actions/setSuggestedActions"));
var _marked =
/*#__PURE__*/
_regenerator.default.mark(_callee3);
_regenerator.default.mark(_callee),
_marked2 =
/*#__PURE__*/
_regenerator.default.mark(observeActivity);
function last(array, predicate) {
for (var i = array.length - 1; i >= 0; i--) {
var item = array[i];
function _callee() {
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _whileConnected.default)(observeActivity);
if (predicate.call(array, item)) {
return item;
case 2:
case "end":
return _context.stop();
}
}
}
}, _marked, this);
}
function _callee3() {
return _regenerator.default.wrap(function _callee3$(_context3) {
function observeActivity(_ref) {
var directLine, userID;
return _regenerator.default.wrap(function observeActivity$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return (0, _whileConnected.default)(
directLine = _ref.directLine, userID = _ref.userID;
_context3.next = 3;
return (0, _observeEach.default)(directLine.activity$,
/*#__PURE__*/
_regenerator.default.mark(function _callee2(directLine, userID) {
_regenerator.default.mark(function _callee2(activity) {
var messageActivities, lastMessageActivity, _lastMessageActivity$, actions;
return _regenerator.default.wrap(function _callee2$(_context2) {

@@ -53,65 +70,26 @@ while (1) {

case 0:
_context2.next = 2;
return (0, _observeEach.default)(directLine.activity$,
/*#__PURE__*/
_regenerator.default.mark(function _callee(activity) {
var activities, lastMessageActivity, _lastMessageActivity$, actions;
activity = patchActivityWithFromRole(activity, userID);
_context2.next = 3;
return (0, _effects.put)((0, _incomingActivity.default)(activity));
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
activity = (0, _objectSpread2.default)({}, activity); // Patch activity.from.role to make sure its either "bot", "user", or "channel"
case 3:
_context2.next = 5;
return (0, _effects.select)((0, _activities.ofType)('message'));
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 = 'channel';
}
}
case 5:
messageActivities = _context2.sent;
lastMessageActivity = messageActivities[messageActivities.length - 1];
_context.next = 4;
return (0, _effects.put)((0, _incomingActivity.default)(activity));
if (!(0, _activityFromBot.default)(lastMessageActivity)) {
_context2.next = 13;
break;
}
case 4:
_context.next = 6;
return (0, _effects.select)(function (_ref) {
var activities = _ref.activities;
return activities;
});
_lastMessageActivity$ = lastMessageActivity.suggestedActions;
_lastMessageActivity$ = _lastMessageActivity$ === void 0 ? {} : _lastMessageActivity$;
actions = _lastMessageActivity$.actions;
_context2.next = 13;
return (0, _effects.put)((0, _setSuggestedActions.default)(actions));
case 6:
activities = _context.sent;
lastMessageActivity = last(activities, function (_ref2) {
var type = _ref2.type;
return type === 'message';
});
if (!(lastMessageActivity && lastMessageActivity.from && lastMessageActivity.from.role === 'bot')) {
_context.next = 14;
break;
}
_lastMessageActivity$ = lastMessageActivity.suggestedActions;
_lastMessageActivity$ = _lastMessageActivity$ === void 0 ? {} : _lastMessageActivity$;
actions = _lastMessageActivity$.actions;
_context.next = 14;
return (0, _effects.put)((0, _setSuggestedActions.default)(actions));
case 14:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
case 2:
case 13:
case "end":

@@ -124,3 +102,3 @@ return _context2.stop();

case 2:
case 3:
case "end":

@@ -130,4 +108,32 @@ return _context3.stop();

}
}, _marked, this);
}, _marked2, this);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJ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wdXQoaW5jb21pbmdBY3Rpdml0eShhY3Rpdml0eSkpO1xuXG4gICAgICAvLyBVcGRhdGUgc3VnZ2VzdGVkIGFjdGlvbnNcbiAgICAgIGNvbnN0IGFjdGl2aXRpZXMgPSB5aWVsZCBzZWxlY3QoKHsgYWN0aXZpdGllcyB9KSA9PiBhY3Rpdml0aWVzKTtcbiAgICAgIGNvbnN0IGxhc3RNZXNzYWdlQWN0aXZpdHkgPSBsYXN0KGFjdGl2aXRpZXMsICh7IHR5cGUgfSkgPT4gdHlwZSA9PT0gJ21lc3NhZ2UnKTtcblxuICAgICAgaWYgKFxuICAgICAgICBsYXN0TWVzc2FnZUFjdGl2aXR5XG4gICAgICAgICYmIGxhc3RNZXNzYWdlQWN0aXZpdHkuZnJvbVxuICAgICAgICAmJiBsYXN0TWVzc2FnZUFjdGl2aXR5LmZyb20ucm9sZSA9PT0gJ2JvdCdcbiAgICAgICkge1xuICAgICAgICBjb25zdCB7IHN1Z2dlc3RlZEFjdGlvbnM6IHsgYWN0aW9ucyB9ID0ge30gfSA9IGxhc3RNZXNzYWdlQWN0aXZpdHk7XG5cbiAgICAgICAgeWllbGQgcHV0KHNldFN1Z2dlc3RlZEFjdGlvbnMoYWN0aW9ucykpO1xuICAgICAgfVxuICAgIH0pO1xuICB9KTtcbn1cbiJdfQ==
function patchActivityWithFromRole(activity, userID) {
// Some activities, such as "ConversationUpdate", does not have "from" defined.
// And although "role" is defined in Direct Line spec, it was not sent over the wire.
// We normalize the activity here to simplify null-check and logic later.
// Patch activity.from.role to make sure its either "bot", "user", or "channel"
if (!activity.from) {
activity = (0, _simpleUpdateIn.default)(activity, ['from', 'role'], function () {
return 'channel';
});
} else if (!activity.from.role) {
if (activity.from.id === userID) {
activity = (0, _simpleUpdateIn.default)(activity, ['from', 'role'], function () {
return 'user';
});
} else if (activity.from.id) {
activity = (0, _simpleUpdateIn.default)(activity, ['from', 'role'], function () {
return 'bot';
});
} else {
activity = (0, _simpleUpdateIn.default)(activity, ['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ZGF0ZUluKGFjdGl2aXR5LCBbJ2Zyb20nLCAncm9sZSddLCAoKSA9PiAnY2hhbm5lbCcpO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBhY3Rpdml0eTtcbn1cbiJdfQ==

@@ -8,3 +8,3 @@ "use strict";

});
exports.default = _callee2;
exports.default = _callee3;

@@ -19,4 +19,2 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));

var _sleep = _interopRequireDefault(require("../utils/sleep"));
var _observeOnce = _interopRequireDefault(require("./effects/observeOnce"));

@@ -26,2 +24,6 @@

var _language = _interopRequireDefault(require("../selectors/language"));
var _sendTimeout = _interopRequireDefault(require("../selectors/sendTimeout"));
var _deleteKey = _interopRequireDefault(require("../utils/deleteKey"));

@@ -31,2 +33,4 @@

var _sleep = _interopRequireDefault(require("../utils/sleep"));
var _uniqueID = _interopRequireDefault(require("../utils/uniqueID"));

@@ -40,3 +44,3 @@

/*#__PURE__*/
_regenerator.default.mark(_callee2),
_regenerator.default.mark(_callee3),
_marked2 =

@@ -46,38 +50,42 @@ /*#__PURE__*/

function _callee2() {
return _regenerator.default.wrap(function _callee2$(_context2) {
function _callee3() {
return _regenerator.default.wrap(function _callee3$(_context3) {
while (1) {
switch (_context2.prev = _context2.next) {
switch (_context3.prev = _context3.next) {
case 0:
_context2.next = 2;
_context3.next = 2;
return (0, _whileConnected.default)(
/*#__PURE__*/
_regenerator.default.mark(function _callee(directLine, userID) {
var numActivitiesPosted, action;
return _regenerator.default.wrap(function _callee$(_context) {
_regenerator.default.mark(function _callee2(_ref) {
var directLine, userID, username, numActivitiesPosted;
return _regenerator.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context.prev = _context.next) {
switch (_context2.prev = _context2.next) {
case 0:
directLine = _ref.directLine, userID = _ref.userID, username = _ref.username;
numActivitiesPosted = 0;
_context2.next = 4;
return (0, _effects.takeEvery)(_postActivity.POST_ACTIVITY,
/*#__PURE__*/
_regenerator.default.mark(function _callee(action) {
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
return _context.delegateYield(postActivity(directLine, userID, username, numActivitiesPosted++, action), "t0", 1);
case 1:
_context.next = 3;
return (0, _effects.take)(_postActivity.POST_ACTIVITY);
case 1:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
case 3:
action = _context.sent;
_context.next = 6;
return (0, _effects.fork)(postActivity, directLine, userID, numActivitiesPosted, action);
case 6:
numActivitiesPosted++;
_context.next = 1;
break;
case 9:
case 4:
case "end":
return _context.stop();
return _context2.stop();
}
}
}, _callee, this);
}, _callee2, this);
}));

@@ -87,3 +95,3 @@

case "end":
return _context2.stop();
return _context3.stop();
}

@@ -94,18 +102,15 @@ }

function postActivity(directLine, userID, numActivitiesPosted, _ref) {
var activity, locale, _activity, attachments, _activity$channelData, _activity$channelData2, clientActivityID, meta, echoBackCall, sendTimeout, _ref6, echoBack;
function postActivity(directLine, userID, username, numActivitiesPosted, _ref2) {
var method, activity, locale, _activity, attachments, _activity$channelData, _activity$channelData2, clientActivityID, meta, echoBackCall, sendTimeout, _ref5, echoBack;
return _regenerator.default.wrap(function postActivity$(_context4) {
return _regenerator.default.wrap(function postActivity$(_context5) {
while (1) {
switch (_context4.prev = _context4.next) {
switch (_context5.prev = _context5.next) {
case 0:
activity = _ref.payload.activity;
_context4.next = 3;
return (0, _effects.select)(function (_ref2) {
var language = _ref2.language;
return language;
});
method = _ref2.meta.method, activity = _ref2.payload.activity;
_context5.next = 3;
return (0, _effects.select)(_language.default);
case 3:
locale = _context4.sent;
locale = _context5.sent;
_activity = activity, attachments = _activity.attachments, _activity$channelData = _activity.channelData;

@@ -131,2 +136,3 @@ _activity$channelData = _activity$channelData === void 0 ? {} : _activity$channelData;

id: userID,
name: username,
role: 'user'

@@ -150,15 +156,16 @@ },

meta = {
clientActivityID: clientActivityID
clientActivityID: clientActivityID,
method: method
};
_context4.next = 12;
_context5.next = 12;
return (0, _effects.put)({
type: _postActivity.POST_ACTIVITY_PENDING,
meta: meta,
payload: {
activity: activity
},
meta: meta
}
});
case 12:
_context4.prev = 12;
_context5.prev = 12;
// Quirks: We might receive INCOMING_ACTIVITY before the postActivity call completed

@@ -168,14 +175,14 @@ // So, we setup expectation first, then postActivity afterward

/*#__PURE__*/
_regenerator.default.mark(function _callee3() {
_regenerator.default.mark(function _callee4() {
var _ref4, _activity2, _activity2$channelDat, channelData, id;
return _regenerator.default.wrap(function _callee3$(_context3) {
return _regenerator.default.wrap(function _callee4$(_context4) {
while (1) {
switch (_context3.prev = _context3.next) {
switch (_context4.prev = _context4.next) {
case 0:
_context3.next = 2;
_context4.next = 2;
return (0, _effects.take)(_incomingActivity.INCOMING_ACTIVITY);
case 2:
_ref4 = _context3.sent;
_ref4 = _context4.sent;
_activity2 = _ref4.payload.activity;

@@ -185,10 +192,10 @@ _activity2$channelDat = _activity2.channelData, channelData = _activity2$channelDat === void 0 ? {} : _activity2$channelDat, id = _activity2.id;

if (!(channelData.clientActivityID === clientActivityID && id)) {
_context3.next = 7;
_context4.next = 7;
break;
}
return _context3.abrupt("return", _activity2);
return _context4.abrupt("return", _activity2);
case 7:
_context3.next = 0;
_context4.next = 0;
break;

@@ -198,6 +205,6 @@

case "end":
return _context3.stop();
return _context4.stop();
}
}
}, _callee3, this);
}, _callee4, this);
})); // Timeout could be due to either:

@@ -208,11 +215,8 @@ // - Post activity call may take too long time to complete

_context4.next = 16;
return (0, _effects.select)(function (_ref5) {
var sendTimeout = _ref5.sendTimeout;
return sendTimeout;
});
_context5.next = 16;
return (0, _effects.select)(_sendTimeout.default);
case 16:
sendTimeout = _context4.sent;
_context4.next = 19;
sendTimeout = _context5.sent;
_context5.next = 19;
return (0, _effects.race)({

@@ -231,5 +235,5 @@ send: (0, _effects.all)({

case 19:
_ref6 = _context4.sent;
echoBack = _ref6.send.echoBack;
_context4.next = 23;
_ref5 = _context5.sent;
echoBack = _ref5.send.echoBack;
_context5.next = 23;
return (0, _effects.put)({

@@ -244,9 +248,9 @@ type: _postActivity.POST_ACTIVITY_FULFILLED,

case 23:
_context4.next = 29;
_context5.next = 29;
break;
case 25:
_context4.prev = 25;
_context4.t0 = _context4["catch"](12);
_context4.next = 29;
_context5.prev = 25;
_context5.t0 = _context5["catch"](12);
_context5.next = 29;
return (0, _effects.put)({

@@ -256,17 +260,17 @@ type: _postActivity.POST_ACTIVITY_REJECTED,

meta: meta,
payload: _context4.t0
payload: _context5.t0
});
case 29:
_context4.prev = 29;
_context4.next = 32;
_context5.prev = 29;
_context5.next = 32;
return (0, _effects.cancelled)();
case 32:
if (!_context4.sent) {
_context4.next = 35;
if (!_context5.sent) {
_context5.next = 35;
break;
}
_context4.next = 35;
_context5.next = 35;
return (0, _effects.put)({

@@ -280,7 +284,7 @@ type: _postActivity.POST_ACTIVITY_REJECTED,

case 35:
return _context4.finish(29);
return _context5.finish(29);
case 36:
case "end":
return _context4.stop();
return _context5.stop();
}

@@ -290,2 +294,2 @@ }

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9wb3N0QWN0aXZpdHlTYWdhLmpzIl0sIm5hbWVzIjpbInBvc3RBY3Rpdml0eSIsImRpcmVjdExpbmUiLCJ1c2VySUQiLCJudW1BY3Rpdml0aWVzUG9zdGVkIiwiUE9TVF9BQ1RJVklUWSIsImFjdGlvbiIsImFjdGl2aXR5IiwicGF5bG9hZCIsImxhbmd1YWdlIiwibG9jYWxlIiwiYXR0YWNobWVudHMiLCJjaGFubmVsRGF0YSIsImNsaWVudEFjdGl2aXR5SUQiLCJtYXAiLCJjb250ZW50VHlwZSIsImNvbnRlbnRVcmwiLCJuYW1lIiwiY2hhbm5lbElkIiwiZnJvbSIsImlkIiwicm9sZSIsInRpbWVzdGFtcCIsImVudGl0aWVzIiwicmVxdWlyZXNCb3RTdGF0ZSIsInN1cHBvcnRzTGlzdGVuaW5nIiwic3VwcG9ydHNUdHM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cpKSkpXG4gICAgfSk7XG5cbiAgICB5aWVsZCBwdXQoeyB0eXBlOiBQT1NUX0FDVElWSVRZX0ZVTEZJTExFRCwgbWV0YSwgcGF5bG9hZDogeyBhY3Rpdml0eTogZWNob0JhY2sgfSB9KTtcbiAgfSBjYXRjaCAoZXJyKSB7XG4gICAgeWllbGQgcHV0KHsgdHlwZTogUE9TVF9BQ1RJVklUWV9SRUpFQ1RFRCwgZXJyb3I6IHRydWUsIG1ldGEsIHBheWxvYWQ6IGVyciB9KTtcbiAgfSBmaW5hbGx5IHtcbiAgICBpZiAoeWllbGQgY2FuY2VsbGVkKCkpIHtcbiAgICAgIHlpZWxkIHB1dCh7IHR5cGU6IFBPU1RfQUNUSVZJVFlfUkVKRUNURUQsIGVycm9yOiB0cnVlLCBtZXRhLCBwYXlsb2FkOiBuZXcgRXJyb3IoJ2NhbmNlbGxlZCcpIH0pO1xuICAgIH1cbiAgfVxufVxuIl19

@@ -8,3 +8,3 @@ "use strict";

});
exports.default = _callee2;
exports.default = _callee;

@@ -15,3 +15,3 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));

var _mime = _interopRequireDefault(require("mime"));
var _mimeWrapper = _interopRequireDefault(require("../utils/mime-wrapper"));

@@ -24,77 +24,84 @@ var _whileConnected = _interopRequireDefault(require("./effects/whileConnected"));

var _stopSpeakingActivity = _interopRequireDefault(require("../actions/stopSpeakingActivity"));
var _marked =
/*#__PURE__*/
_regenerator.default.mark(_callee2);
_regenerator.default.mark(_callee),
_marked2 =
/*#__PURE__*/
_regenerator.default.mark(sendFilesToPostActivity),
_marked3 =
/*#__PURE__*/
_regenerator.default.mark(postActivityWithFiles);
var getType = _mime.default.getType.bind(_mime.default);
var getType = _mimeWrapper.default.getType.bind(_mimeWrapper.default);
function _callee2() {
return _regenerator.default.wrap(function _callee2$(_context2) {
function _callee() {
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _whileConnected.default)(sendFilesToPostActivity);
case 2:
case "end":
return _context.stop();
}
}
}, _marked, this);
}
function sendFilesToPostActivity() {
return _regenerator.default.wrap(function sendFilesToPostActivity$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return (0, _whileConnected.default)(
/*#__PURE__*/
_regenerator.default.mark(function _callee() {
var _ref, files;
return (0, _effects.takeEvery)(function (_ref) {
var payload = _ref.payload,
type = _ref.type;
return type === _sendFiles.SEND_FILES && payload.files.length;
}, postActivityWithFiles);
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _effects.take)(_sendFiles.SEND_FILES);
case 2:
case "end":
return _context2.stop();
}
}
}, _marked2, this);
}
case 2:
_ref = _context.sent;
files = _ref.payload.files;
if (!files.length) {
_context.next = 9;
break;
}
_context.next = 7;
return (0, _effects.put)((0, _postActivity.default)({
attachments: [].map.call(files, function (file) {
return {
contentType: getType(file.name) || 'application/octet-stream',
contentUrl: file.url,
name: file.name
};
}),
channelData: {
attachmentSizes: [].map.call(files, function (file) {
return file.size;
})
},
type: 'message'
}));
case 7:
_context.next = 9;
return (0, _effects.put)((0, _stopSpeakingActivity.default)());
case 9:
_context.next = 0;
break;
case 11:
case "end":
return _context.stop();
}
}
}, _callee, this);
function postActivityWithFiles(_ref2) {
var files;
return _regenerator.default.wrap(function postActivityWithFiles$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
files = _ref2.payload.files;
_context3.next = 3;
return (0, _effects.put)((0, _postActivity.default)({
attachments: [].map.call(files, function (_ref3) {
var name = _ref3.name,
url = _ref3.url;
return {
contentType: getType(name) || 'application/octet-stream',
contentUrl: url,
name: name
};
}),
channelData: {
attachmentSizes: [].map.call(files, function (_ref4) {
var size = _ref4.size;
return size;
})
},
type: 'message'
}));
case 2:
case 3:
case "end":
return _context2.stop();
return _context3.stop();
}
}
}, _marked, this);
}, _marked3, this);
}
//# sourceMapping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cblxuY29uc3QgZ2V0VHlwZSA9IG1pbWUuZ2V0VHlwZS5iaW5kKG1pbWUpO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiogKCkge1xuICB5aWVsZCB3aGlsZUNvbm5lY3RlZChmdW5jdGlvbiogKCkge1xuICAgIGZvciAoOzspIHtcbiAgICAgIGNvbnN0IHsgcGF5bG9hZDogeyBmaWxlcyB9IH0gPSB5aWVsZCB0YWtlKFNFTkRfRklMRVMpO1xuXG4gICAgICBpZiAoZmlsZXMubGVuZ3RoKSB7XG4gICAgICAgIHlpZWxkIHB1dChwb3N0QWN0aXZpdHkoe1xuICAgICAgICAgIGF0dGFjaG1lbnRzOiBbXS5tYXAuY2FsbChmaWxlcywgZmlsZSA9PiAoe1xuICAgICAgICAgICAgY29udGVudFR5cGU6IGdldFR5cGUoZmlsZS5uYW1lKSB8fCAnYXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtJyxcbiAgICAgICAgICAgIGNvbnRlbnRVcmw6IGZpbGUudXJsLFxuICAgICAgICAgICAgbmFtZTogZmlsZS5uYW1lXG4gICAgICAgICAgfSkpLFxuICAgICAgICAgIGNoYW5uZWxEYXRhOiB7XG4gICAgICAgICAgICBhdHRhY2htZW50U2l6ZXM6IFtdLm1hcC5jYWxsKGZpbGVzLCBmaWxlID0+IGZpbGUuc2l6ZSlcbiAgICAgICAgICB9LFxuICAgICAgICAgIHR5cGU6ICdtZXNzYWdlJ1xuICAgICAgICB9KSk7XG5cbiAgICAgICAgeWllbGQgcHV0KHN0b3BTcGVha2luZ0FjdGl2aXR5KCkpO1xuICAgICAgfVxuICAgIH1cbiAgfSk7XG59XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9zZW5kRmlsZXNUb1Bvc3RBY3Rpdml0eVNhZ2EuanMiXSwibmFtZXMiOlsic2VuZEZpbGVzVG9Qb3N0QWN0a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G9zdEFjdGl2aXR5JztcblxuY29uc3QgZ2V0VHlwZSA9IG1pbWUuZ2V0VHlwZS5iaW5kKG1pbWUpO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiogKCkge1xuICB5aWVsZCB3aGlsZUNvbm5lY3RlZChzZW5kRmlsZXNUb1Bvc3RBY3Rpdml0eSk7XG59XG5cbmZ1bmN0aW9uKiBzZW5kRmlsZXNUb1Bvc3RBY3Rpdml0eSgpIHtcbiAgeWllbGQgdGFrZUV2ZXJ5KFxuICAgICh7IHBheWxvYWQsIHR5cGUgfSkgPT4gKFxuICAgICAgdHlwZSA9PT0gU0VORF9GSUxFU1xuICAgICAgJiYgcGF5bG9hZC5maWxlcy5sZW5ndGhcbiAgICApLFxuICAgIHBvc3RBY3Rpdml0eVdpdGhGaWxlc1xuICApO1xufVxuXG5mdW5jdGlvbiogcG9zdEFjdGl2aXR5V2l0aEZpbGVzKHsgcGF5bG9hZDogeyBmaWxlcyB9IH0pIHtcbiAgeWllbGQgcHV0KHBvc3RBY3Rpdml0eSh7XG4gICAgYXR0YWNobWVudHM6IFtdLm1hcC5jYWxsKGZpbGVzLCAoeyBuYW1lLCB1cmwgfSkgPT4gKHtcbiAgICAgIGNvbnRlbnRUeXBlOiBnZXRUeXBlKG5hbWUpIHx8ICdhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW0nLFxuICAgICAgY29udGVudFVybDogdXJsLFxuICAgICAgbmFtZTogbmFtZVxuICAgIH0pKSxcbiAgICBjaGFubmVsRGF0YToge1xuICAgICAgYXR0YWNobWVudFNpemVzOiBbXS5tYXAuY2FsbChmaWxlcywgKHsgc2l6ZSB9KSA9PiBzaXplKVxuICAgIH0sXG4gICAgdHlwZTogJ21lc3NhZ2UnXG4gIH0pKTtcbn1cbiJdfQ==

@@ -8,3 +8,3 @@ "use strict";

});
exports.default = _callee2;
exports.default = _callee;

@@ -21,82 +21,70 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));

var _startSpeakingActivity = _interopRequireDefault(require("../actions/startSpeakingActivity"));
var _stopSpeakingActivity = _interopRequireDefault(require("../actions/stopSpeakingActivity"));
var _marked =
/*#__PURE__*/
_regenerator.default.mark(_callee2);
_regenerator.default.mark(_callee),
_marked2 =
/*#__PURE__*/
_regenerator.default.mark(sendMessageToPostActivity),
_marked3 =
/*#__PURE__*/
_regenerator.default.mark(postActivityWithMessage);
function _callee2() {
return _regenerator.default.wrap(function _callee2$(_context2) {
function _callee() {
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _whileConnected.default)(sendMessageToPostActivity);
case 2:
case "end":
return _context.stop();
}
}
}, _marked, this);
}
function sendMessageToPostActivity() {
return _regenerator.default.wrap(function sendMessageToPostActivity$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return (0, _whileConnected.default)(
/*#__PURE__*/
_regenerator.default.mark(function _callee() {
var _ref, _ref$payload, text, via;
return (0, _effects.takeEvery)(function (_ref) {
var payload = _ref.payload,
type = _ref.type;
return type === _sendMessage.SEND_MESSAGE && payload.text;
}, postActivityWithMessage);
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _effects.take)(_sendMessage.SEND_MESSAGE);
case 2:
case "end":
return _context2.stop();
}
}
}, _marked2, this);
}
case 2:
_ref = _context.sent;
_ref$payload = _ref.payload;
text = _ref$payload.text;
via = _ref$payload.via;
function postActivityWithMessage(_ref2) {
var _ref2$payload, method, text;
if (!text) {
_context.next = 16;
break;
}
return _regenerator.default.wrap(function postActivityWithMessage$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_ref2$payload = _ref2.payload, method = _ref2$payload.method, text = _ref2$payload.text;
_context3.next = 3;
return (0, _effects.put)((0, _postActivity.default)({
text: text,
textFormat: 'plain',
type: 'message'
}, method));
_context.next = 9;
return (0, _effects.put)((0, _postActivity.default)({
text: text,
textFormat: 'plain',
type: 'message'
}));
case 9:
if (!(via === 'speech')) {
_context.next = 14;
break;
}
_context.next = 12;
return (0, _effects.put)((0, _startSpeakingActivity.default)());
case 12:
_context.next = 16;
break;
case 14:
_context.next = 16;
return (0, _effects.put)((0, _stopSpeakingActivity.default)());
case 16:
_context.next = 0;
break;
case 18:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
case 2:
case 3:
case "end":
return _context2.stop();
return _context3.stop();
}
}
}, _marked, this);
}, _marked3, this);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9zZW5kTWVzc2FnZVRvUG9zdEFjdGl2aXR5U2FnYS5qcyJdLCJuYW1lcyI6WyJTRU5EX01FU1NBR0UiLCJwYXlsb2FkIiwidGV4dCIsInZpYSIsInRleHRGb3JtYXQiLCJ0eXBlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBOztBQUtBOztBQUVBOztBQUNBOztBQUNBOztBQUNBOzs7Ozs7QUFFZTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDYixpQkFBTTtBQUFBO0FBQUEsb0NBQWU7QUFBQTs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBRWtCLDJCQUFNLG1CQUFLQSx5QkFBTCxDQUFOOztBQUZsQjtBQUFBO0FBQUEsd0NBRVRDLE9BRlM7QUFFRUMsb0JBQUFBLElBRkYsZ0JBRUVBLElBRkY7QUFFUUMsb0JBQUFBLEdBRlIsZ0JBRVFBLEdBRlI7O0FBQUEseUJBSWJELElBSmE7QUFBQTtBQUFBO0FBQUE7O0FBQUE7QUFLZiwyQkFBTSxrQkFBSSwyQkFBYTtBQUNyQkEsc0JBQUFBLElBQUksRUFBSkEsSUFEcUI7QUFFckJFLHNCQUFBQSxVQUFVLEVBQUUsT0FGUztBQUdyQkMsc0JBQUFBLElBQUksR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5cbmZ1bmN0aW9uKiBzZW5kTWVzc2FnZVRvUG9zdEFjdGl2aXR5KCkge1xuICB5aWVsZCB0YWtlRXZlcnkoKHsgcGF5bG9hZCwgdHlwZSB9KSA9PiAoXG4gICAgdHlwZSA9PT0gU0VORF9NRVNTQUdFXG4gICAgJiYgcGF5bG9hZC50ZXh0XG4gICksIHBvc3RBY3Rpdml0eVdpdGhNZXNzYWdlKTtcbn1cblxuZnVuY3Rpb24qIHBvc3RBY3Rpdml0eVdpdGhNZXNzYWdlKHsgcGF5bG9hZDogeyBtZXRob2QsIHRleHQgfSB9KSB7XG4gIHlpZWxkIHB1dChwb3N0QWN0aXZpdHkoe1xuICAgIHRleHQsXG4gICAgdGV4dEZvcm1hdDogJ3BsYWluJyxcbiAgICB0eXBlOiAnbWVzc2FnZSdcbiAgfSwgbWV0aG9kKSk7XG59XG4iXX0=

@@ -8,3 +8,3 @@ "use strict";

});
exports.default = _callee2;
exports.default = _callee;

@@ -15,4 +15,2 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));

var _whileConnected = _interopRequireDefault(require("./effects/whileConnected"));
var _sendPostBack = require("../actions/sendPostBack");

@@ -22,62 +20,74 @@

var _whileConnected = _interopRequireDefault(require("./effects/whileConnected"));
var _marked =
/*#__PURE__*/
_regenerator.default.mark(_callee2);
_regenerator.default.mark(_callee),
_marked2 =
/*#__PURE__*/
_regenerator.default.mark(sendPostBackToPostActivity),
_marked3 =
/*#__PURE__*/
_regenerator.default.mark(postActivityWithPostBack);
function _callee2() {
return _regenerator.default.wrap(function _callee2$(_context2) {
function _callee() {
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _whileConnected.default)(sendPostBackToPostActivity);
case 2:
case "end":
return _context.stop();
}
}
}, _marked, this);
}
function sendPostBackToPostActivity() {
return _regenerator.default.wrap(function sendPostBackToPostActivity$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return (0, _whileConnected.default)(
/*#__PURE__*/
_regenerator.default.mark(function _callee() {
var _ref, value;
return (0, _effects.takeEvery)(function (_ref) {
var payload = _ref.payload,
type = _ref.type;
return type === _sendPostBack.SEND_POST_BACK && payload.value;
}, postActivityWithPostBack);
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _effects.take)(_sendPostBack.SEND_POST_BACK);
case 2:
case "end":
return _context2.stop();
}
}
}, _marked2, this);
}
case 2:
_ref = _context.sent;
value = _ref.payload.value;
if (!value) {
_context.next = 7;
break;
}
_context.next = 7;
return (0, _effects.put)((0, _postActivity.default)({
channelData: {
postBack: true
},
text: typeof value === 'string' ? value : undefined,
type: 'message',
value: typeof value !== 'string' ? value : undefined
}));
case 7:
_context.next = 0;
break;
case 9:
case "end":
return _context.stop();
}
}
}, _callee, this);
function postActivityWithPostBack(_ref2) {
var value;
return _regenerator.default.wrap(function postActivityWithPostBack$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
value = _ref2.payload.value;
_context3.next = 3;
return (0, _effects.put)((0, _postActivity.default)({
channelData: {
postBack: true
},
text: typeof value === 'string' ? value : undefined,
type: 'message',
value: typeof value !== 'string' ? value : undefined
}));
case 2:
case 3:
case "end":
return _context2.stop();
return _context3.stop();
}
}
}, _marked, this);
}, _marked3, this);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9zZW5kUG9zdEJhY2tUb1Bvc3RBY3Rpdml0eVNhZ2EuanMiXSwibmFtZXMiOlsiU0VORF9QT1NUX0JBQ0siLCJ2YWx1ZSIsInBheWxvYWQiLCJjaGFubmVsRGF0YSIsInBvc3RCYWNrIiwidGV4dCIsInVuZGVmaW5lZCIsInR5cGUiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUE7O0FBS0E7O0FBR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Wx1ZSA6IHVuZGVmaW5lZFxuICB9KSk7XG59XG4iXX0=

@@ -10,2 +10,4 @@ "use strict";

var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));

@@ -15,12 +17,14 @@

var _whileConnected = _interopRequireDefault(require("./effects/whileConnected"));
var _markActivity = require("../actions/markActivity");
var _startSpeakingActivity = require("../actions/startSpeakingActivity");
var _startDictate = _interopRequireDefault(require("../actions/startDictate"));
var _stopSpeakingActivity = require("../actions/stopSpeakingActivity");
var _speakingActivity = _interopRequireDefault(require("../definitions/speakingActivity"));
var _startDictate = _interopRequireDefault(require("../actions/startDictate"));
var _whileConnected = _interopRequireDefault(require("./effects/whileConnected"));
var _whileSpeakIncomingActivity = _interopRequireDefault(require("./effects/whileSpeakIncomingActivity"));
var _activities2 = require("../selectors/activities");
var _marked =

@@ -31,3 +35,6 @@ /*#__PURE__*/

/*#__PURE__*/
_regenerator.default.mark(startDictateAfterSpeakActivitySaga);
_regenerator.default.mark(startDictateAfterSpeakActivity),
_marked3 =
/*#__PURE__*/
_regenerator.default.mark(startDictateAfterAllActivitiesSpoken);

@@ -42,4 +49,3 @@ function _callee2() {

/*#__PURE__*/
_regenerator.default.mark(function _callee(_, userID) {
var task;
_regenerator.default.mark(function _callee() {
return _regenerator.default.wrap(function _callee$(_context) {

@@ -50,22 +56,5 @@ while (1) {

_context.next = 2;
return (0, _effects.take)(_startSpeakingActivity.START_SPEAKING_ACTIVITY);
return (0, _whileSpeakIncomingActivity.default)(startDictateAfterSpeakActivity);
case 2:
_context.next = 4;
return (0, _effects.fork)(startDictateAfterSpeakActivitySaga, userID);
case 4:
task = _context.sent;
_context.next = 7;
return (0, _effects.take)(_stopSpeakingActivity.STOP_SPEAKING_ACTIVITY);
case 7:
_context.next = 9;
return (0, _effects.cancel)(task);
case 9:
_context.next = 0;
break;
case 11:
case "end":

@@ -86,63 +75,49 @@ return _context.stop();

function startDictateAfterSpeakActivitySaga() {
var _loop;
return _regenerator.default.wrap(function startDictateAfterSpeakActivitySaga$(_context4) {
function startDictateAfterSpeakActivity() {
return _regenerator.default.wrap(function startDictateAfterSpeakActivity$(_context3) {
while (1) {
switch (_context4.prev = _context4.next) {
switch (_context3.prev = _context3.next) {
case 0:
_loop =
/*#__PURE__*/
_regenerator.default.mark(function _loop() {
var _ref, activityID, activities;
_context3.next = 2;
return (0, _effects.takeEvery)(function (_ref) {
var payload = _ref.payload,
type = _ref.type;
return type === _markActivity.MARK_ACTIVITY && payload.name === 'speak' && payload.value === false;
}, startDictateAfterAllActivitiesSpoken);
return _regenerator.default.wrap(function _loop$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return (0, _effects.take)(function (_ref2) {
var payload = _ref2.payload,
type = _ref2.type;
return type === _markActivity.MARK_ACTIVITY && payload.name === 'speak' && payload.value === false;
});
case 2:
case "end":
return _context3.stop();
}
}
}, _marked2, this);
}
case 2:
_ref = _context3.sent;
activityID = _ref.payload.activityID;
_context3.next = 6;
return (0, _effects.select)(function (_ref3) {
var activities = _ref3.activities;
return activities;
});
function startDictateAfterAllActivitiesSpoken(_ref2) {
var activityID, activities, _activities, spokenActivity;
case 6:
activities = _context3.sent;
return _regenerator.default.wrap(function startDictateAfterAllActivitiesSpoken$(_context4) {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
activityID = _ref2.payload.activityID;
_context4.next = 3;
return (0, _effects.select)((0, _activities2.ofID)(activityID));
if (activities.some(function (activity) {
return activity.id !== activityID && activity.channelData && activity.channelData.speak === true;
})) {
_context3.next = 10;
break;
}
case 3:
activities = _context4.sent;
_activities = (0, _slicedToArray2.default)(activities, 1), spokenActivity = _activities[0];
_context3.next = 10;
return (0, _effects.put)((0, _startDictate.default)());
if (!(spokenActivity && spokenActivity.inputHint !== 'ignoringInput' // Checks if there are no more activities that will be synthesis
&& !activities.some(function (activity) {
return activity.id !== activityID && (0, _speakingActivity.default)(activity);
}))) {
_context4.next = 8;
break;
}
case 10:
case "end":
return _context3.stop();
}
}
}, _loop, this);
});
_context4.next = 8;
return (0, _effects.put)((0, _startDictate.default)());
case 1:
return _context4.delegateYield(_loop(), "t0", 2);
case 2:
_context4.next = 1;
break;
case 4:
case 8:
case "end":

@@ -152,4 +127,4 @@ return _context4.stop();

}
}, _marked2, this);
}, _marked3, this);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9zdGFydERpY3RhdGVBZnRlclNwZWFrQWN0aXZpdHlTYWdhLmpzIl0sIm5hbWVzIjpbInN0YXJ0RGljdGF0ZUFmdGVyU3BlYWtBY3Rpdml0eVNhZ2EiLCJfIiwidXNlcklEIiwiU1RBUlRfU1BFQUtJTkdfQUNUSVZJVFkiLCJ0YXNrIiwiU1RPUF9TUEVBS0lOR19BQ1RJVklUWSIsInBheWxvYWQiLCJ0eXBlIiwiTUFSS19BQ1RJVklUWSIsIm5hbWUiLCJ2YWx1ZSIsImFjdGl2aXR5SUQiLCJhY3Rpdml0aWVzIiwic29tZSIsImFjdGl2aXR5IiwiaWQiLCJjaGFubmVsRGF0YSIsInNwZWFrIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBOztBQVFBOztBQUVBOztBQUNBOztBQUNBOztBQUNBOzs7Ozs7OzBCQWVVQSxrQzs7QUFiSztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDYixpQkFBTTtBQUFBO0FBQUEsb0NBQWUsaUJBQVdDLENBQVgsRUFBY0MsTUFBZDtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUVqQiwyQkFBTSxtQkFBS0MsOENBQUwsQ0FBTjs7QUFGaUI7QUFBQTtBQUlKLDJCQUFNLG1CQUFLSCxrQ0FBTCxFQUF5Q0UsTUFBekMsQ0FBTjs7QUFKSTtBQUlYRSxvQkFBQU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dml0aWVzLnNvbWUoXG4gICAgICBhY3Rpdml0eSA9PiBhY3Rpdml0eS5pZCAhPT0gYWN0aXZpdHlJRCAmJiBzcGVha2luZ0FjdGl2aXR5KGFjdGl2aXR5KVxuICAgIClcbiAgKSB7XG4gICAgLy8gV2UgaG9ub3IgaW5wdXQgaGludCBiYXNlZCBvbiB0aGlzIGFydGljbGVcbiAgICAvLyBodHRwczovL2RvY3MubWljcm9zb2Z0LmNvbS9lbi11cy9henVyZS9ib3Qtc2VydmljZS9ib3QtYnVpbGRlci1ob3d0by1hZGQtaW5wdXQtaGludHM/dmlldz1henVyZS1ib3Qtc2VydmljZS00LjAmdGFicz1jc1xuICAgIHlpZWxkIHB1dChzdGFydERpY3RhdGUoKSk7XG4gIH1cbn1cbiJdfQ==

@@ -8,3 +8,3 @@ "use strict";

});
exports.default = _callee2;
exports.default = _callee;

@@ -15,4 +15,2 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));

var _whileConnected = _interopRequireDefault(require("./effects/whileConnected"));
var _submitSendBox = require("../actions/submitSendBox");

@@ -24,58 +22,68 @@

var _whileConnected = _interopRequireDefault(require("./effects/whileConnected"));
var _sendBoxValue = _interopRequireDefault(require("../selectors/sendBoxValue"));
var _marked =
/*#__PURE__*/
_regenerator.default.mark(_callee2);
_regenerator.default.mark(_callee),
_marked2 =
/*#__PURE__*/
_regenerator.default.mark(submitSendBox);
function _callee2() {
return _regenerator.default.wrap(function _callee2$(_context2) {
function _callee() {
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context2.prev = _context2.next) {
switch (_context.prev = _context.next) {
case 0:
_context2.next = 2;
return (0, _whileConnected.default)(
_context.next = 2;
return (0, _whileConnected.default)(submitSendBox);
case 2:
case "end":
return _context.stop();
}
}
}, _marked, this);
}
function submitSendBox() {
return _regenerator.default.wrap(function submitSendBox$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return (0, _effects.takeEvery)(_submitSendBox.SUBMIT_SEND_BOX,
/*#__PURE__*/
_regenerator.default.mark(function _callee() {
var _ref, via, sendBoxValue;
return _regenerator.default.wrap(function _callee$(_context) {
_regenerator.default.mark(function _callee2(_ref) {
var method, sendBoxValue;
return _regenerator.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context.prev = _context.next) {
switch (_context2.prev = _context2.next) {
case 0:
_context.next = 2;
return (0, _effects.take)(_submitSendBox.SUBMIT_SEND_BOX);
method = _ref.payload.method;
_context2.next = 3;
return (0, _effects.select)(_sendBoxValue.default);
case 2:
_ref = _context.sent;
via = _ref.payload.via;
_context.next = 6;
return (0, _effects.select)(function (_ref2) {
var sendBoxValue = _ref2.sendBoxValue;
return sendBoxValue;
});
case 3:
sendBoxValue = _context2.sent;
case 6:
sendBoxValue = _context.sent;
if (!sendBoxValue) {
_context.next = 12;
_context2.next = 9;
break;
}
_context.next = 10;
return (0, _effects.put)((0, _sendMessage.default)(sendBoxValue, via));
_context2.next = 7;
return (0, _effects.put)((0, _sendMessage.default)(sendBoxValue, method));
case 10:
_context.next = 12;
return (0, _effects.put)((0, _setSendBox.default)('', 'keyboard'));
case 7:
_context2.next = 9;
return (0, _effects.put)((0, _setSendBox.default)(''));
case 12:
_context.next = 0;
break;
case 14:
case 9:
case "end":
return _context.stop();
return _context2.stop();
}
}
}, _callee, this);
}, _callee2, this);
}));

@@ -85,7 +93,7 @@

case "end":
return _context2.stop();
return _context3.stop();
}
}
}, _marked, this);
}, _marked2, this);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9zdWJtaXRTZW5kQm94U2FnYS5qcyJdLCJuYW1lcyI6WyJTVUJNSVRfU0VORF9CT1giLCJ2aWEiLCJwYXlsb2FkIiwic2VuZEJveFZhbHVlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBOztBQU1BOztBQUVBOztBQUNBOztBQUNBOzs7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L3NlbGVjdG9ycy9zZW5kQm94VmFsdWUnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiogKCkge1xuICB5aWVsZCB3aGlsZUNvbm5lY3RlZChzdWJtaXRTZW5kQm94KTtcbn1cblxuZnVuY3Rpb24qIHN1Ym1pdFNlbmRCb3goKSB7XG4gIHlpZWxkIHRha2VFdmVyeShTVUJNSVRfU0VORF9CT1gsIGZ1bmN0aW9uKiAoeyBwYXlsb2FkOiB7IG1ldGhvZCB9IH0pIHtcbiAgICBjb25zdCBzZW5kQm94VmFsdWUgPSB5aWVsZCBzZWxlY3Qoc2VuZEJveFZhbHVlU2VsZWN0b3IpO1xuXG4gICAgaWYgKHNlbmRCb3hWYWx1ZSkge1xuICAgICAgeWllbGQgcHV0KHNlbmRNZXNzYWdlKHNlbmRCb3hWYWx1ZSwgbWV0aG9kKSk7XG4gICAgICB5aWVsZCBwdXQoc2V0U2VuZEJveCgnJykpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0=
{
"name": "botframework-webchat-core",
"version": "4.2.1-master.d9808ca",
"version": "4.2.1-master.da98602",
"description": "Core of botframework-webchat",

@@ -53,3 +53,3 @@ "main": "lib/index.js",

"babel-plugin-version-transform": "^1.0.0",
"botframework-directlinejs": "^0.10.1",
"botframework-directlinejs": "~0.11.2",
"concurrently": "^4.0.1",

@@ -65,2 +65,3 @@ "jest": "^23.6.0",

"jsonwebtoken": "^8.3.0",
"math-random": "^1.0.4",
"mime": "^2.3.1",

@@ -67,0 +68,0 @@ "redux": "^4.0.0",

const CONNECT = 'DIRECT_LINE/CONNECT';
const CONNECT_FULFILLED = `${ CONNECT }_FULFILLED`;
const CONNECT_FULFILLING = `${ CONNECT }_FULFILLING`;
const CONNECT_PENDING = `${ CONNECT }_PENDING`;
const CONNECT_REJECTED = `${ CONNECT }_REJECTED`;
const CONNECT_FULFILLED = `${ CONNECT }_FULFILLED`;
const CONNECT_STILL_PENDING = `${ CONNECT }_STILL_PENDING`;
export default function ({ directLine, userID }) {
export default function ({ directLine, userID, username }) {
return {
type: CONNECT,
payload: { directLine, userID }
payload: {
directLine,
userID,
username
}
};

@@ -15,5 +21,7 @@ }

CONNECT,
CONNECT_FULFILLED,
CONNECT_FULFILLING,
CONNECT_PENDING,
CONNECT_REJECTED,
CONNECT_FULFILLED
CONNECT_STILL_PENDING
}

@@ -8,5 +8,6 @@ import { FULFILLED, PENDING, REJECTED } from 'redux-promise-middleware';

export default function (activity) {
export default function (activity, method = 'keyboard') {
return {
type: POST_ACTIVITY,
meta: { method },
payload: { activity }

@@ -13,0 +14,0 @@ };

const SEND_MESSAGE = 'WEB_CHAT/SEND_MESSAGE';
export default function sendMessage(text, via) {
export default function sendMessage(text, method) {
return {
type: SEND_MESSAGE,
payload: { text, via }
payload: { method, text }
};

@@ -8,0 +8,0 @@ }

const SET_SEND_BOX = 'WEB_CHAT/SET_SEND_BOX';
export default function (text, via) {
export default function (text) {
return {
type: SET_SEND_BOX,
payload: { text, via }
payload: { text }
};

@@ -8,0 +8,0 @@ }

@@ -0,4 +1,6 @@

// TODO: [P3] Take this deprecation code out when releasing on or after 2020 January 13
const SET_SEND_TYPING = 'WEB_CHAT/SET_SEND_TYPING';
export default function (value) {
// Deprecation notes added to reducer
return {

@@ -5,0 +7,0 @@ type: SET_SEND_TYPING,

const SUBMIT_SEND_BOX = 'WEB_CHAT/SUBMIT_SEND_BOX';
export default function submitSendBox(via) {
export default function submitSendBox(method = 'keyboard') {
return {
type: SUBMIT_SEND_BOX,
payload: { via }
payload: { method }
};

@@ -8,0 +8,0 @@ }

@@ -6,4 +6,6 @@ import connect from './actions/connect';

import postActivity from './actions/postActivity';
import sendEvent from './actions/sendEvent';
import sendFiles from './actions/sendFiles';
import sendMessage from './actions/sendMessage';
import sendMessageBack from './actions/sendMessageBack';
import sendPostBack from './actions/sendPostBack';

@@ -16,2 +18,3 @@ import setDictateInterims from './actions/setDictateInterims';

import setSendTyping from './actions/setSendTyping';
import setSendTypingIndicator from './actions/setSendTypingIndicator';
import startDictate from './actions/startDictate';

@@ -36,4 +39,6 @@ import startSpeakingActivity from './actions/startSpeakingActivity';

postActivity,
sendEvent,
sendFiles,
sendMessage,
sendMessageBack,
sendPostBack,

@@ -45,3 +50,3 @@ setDictateInterims,

setSendTimeout,
setSendTyping,
setSendTypingIndicator,
startDictate,

@@ -52,3 +57,6 @@ startSpeakingActivity,

submitSendBox,
version
version,
// TODO: [P3] Take this deprecation code out when releasing on or after January 13 2020
setSendTyping
}
import { combineReducers } from 'redux';
import activities from './reducers/activities';
import connectivityStatus from './reducers/connectivityStatus'
import dictateInterims from './reducers/dictateInterims';

@@ -11,2 +12,3 @@ import dictateState from './reducers/dictateState';

import sendTimeout from './reducers/sendTimeout';
import sendTypingIndicator from './reducers/sendTypingIndicator';
import suggestedActions from './reducers/suggestedActions';

@@ -16,2 +18,3 @@

activities,
connectivityStatus,
dictateInterims,

@@ -24,3 +27,7 @@ dictateState,

sendTimeout,
suggestedActions
sendTypingIndicator,
suggestedActions,
// TODO: [P3] Take this deprecation code out when releasing on or after January 13 2020
sendTyping: sendTypingIndicator
})

@@ -28,5 +28,10 @@ import updateIn from 'simple-update-in';

channelData: { clientActivityID: nextClientActivityID } = {},
from: { id: nextFromID } = {}
from: { id: nextFromID, role: nextFromRole } = {},
type: nextType
} = nextActivity;
if (nextType === 'typing' && nextFromRole === 'user') {
return activities;
}
const nextTimestamp = Date.parse(nextActivity.timestamp);

@@ -33,0 +38,0 @@ const nextActivities = activities.filter(({ channelData: { clientActivityID } = {}, from, type }) =>

@@ -6,13 +6,19 @@ import { fork } from 'redux-saga/effects';

import connectSaga from './sagas/connectSaga';
import detectSlowConnectionSaga from './sagas/detectSlowConnectionSaga';
import incomingActivitySaga from './sagas/incomingActivitySaga';
import incomingTypingSaga from './sagas/incomingTypingSaga';
import markActivityForSpeakSaga from './sagas/markActivityForSpeakSaga';
import markActivityForSpeakOnIncomingActivityFromOthersSaga from './sagas/markActivityForSpeakOnIncomingActivityFromOthersSaga';
import markAllAsSpokenOnStopSpeakActivitySaga from './sagas/markAllAsSpokenOnStopSpeakActivitySaga';
import postActivitySaga from './sagas/postActivitySaga';
import removeIncomingTypingAfterIntervalSaga from './sagas/removeIncomingTypingAfterIntervalSaga';
import sendConversationUpdateOnConnectSaga from './sagas/sendConversationUpdateOnConnectSaga';
import sendEventToPostActivitySaga from './sagas/sendEventToPostActivitySaga';
import sendFilesToPostActivitySaga from './sagas/sendFilesToPostActivitySaga';
import sendMessageToPostActivitySaga from './sagas/sendMessageToPostActivitySaga';
import sendMessageBackToPostActivitySaga from './sagas/sendMessageBackToPostActivitySaga';
import sendPostBackToPostActivitySaga from './sagas/sendPostBackToPostActivitySaga';
import sendTypingOnSetSendBoxSaga from './sagas/sendTypingOnSetSendBoxSaga';
import sendTypingIndicatorOnSetSendBoxSaga from './sagas/sendTypingIndicatorOnSetSendBoxSaga';
import startDictateAfterSpeakActivitySaga from './sagas/startDictateAfterSpeakActivitySaga';
import stopDictateOnCardAction from './sagas/stopDictateOnCardAction';
import stopSpeakActivityOnInputSaga from './sagas/stopSpeakActivityOnInputSaga';
import startSpeakActivityOnPostActivitySaga from './sagas/startSpeakActivityOnPostActivitySaga';
import stopDictateOnCardActionSaga from './sagas/stopDictateOnCardActionSaga';
import stopSpeakingActivityOnInputSaga from './sagas/stopSpeakingActivityOnInputSaga';
import submitSendBoxSaga from './sagas/submitSendBoxSaga';

@@ -24,14 +30,20 @@

yield fork(connectSaga);
yield fork(detectSlowConnectionSaga);
yield fork(incomingActivitySaga);
yield fork(incomingTypingSaga);
yield fork(markActivityForSpeakSaga);
yield fork(markActivityForSpeakOnIncomingActivityFromOthersSaga);
yield fork(markAllAsSpokenOnStopSpeakActivitySaga);
yield fork(postActivitySaga);
yield fork(removeIncomingTypingAfterIntervalSaga);
yield fork(sendConversationUpdateOnConnectSaga);
yield fork(sendEventToPostActivitySaga);
yield fork(sendFilesToPostActivitySaga);
yield fork(sendMessageToPostActivitySaga);
yield fork(sendMessageBackToPostActivitySaga);
yield fork(sendPostBackToPostActivitySaga);
yield fork(sendTypingOnSetSendBoxSaga);
yield fork(sendTypingIndicatorOnSetSendBoxSaga);
yield fork(startDictateAfterSpeakActivitySaga);
yield fork(stopDictateOnCardAction);
yield fork(stopSpeakActivityOnInputSaga);
yield fork(startSpeakActivityOnPostActivitySaga);
yield fork(stopDictateOnCardActionSaga);
yield fork(stopSpeakingActivityOnInputSaga);
yield fork(submitSendBoxSaga);
}
import {
put,
take
takeEvery
} from 'redux-saga/effects';
import whileConnected from './effects/whileConnected';
import { POST_ACTIVITY_PENDING } from '../actions/postActivity';
import whileConnected from './effects/whileConnected';
import setSuggestedActions from '../actions/setSuggestedActions';
export default function* () {
yield whileConnected(function* () {
for (;;) {
yield take(({ payload, type }) => type === POST_ACTIVITY_PENDING && payload.activity.type === 'message');
yield put(setSuggestedActions());
}
});
yield whileConnected(clearSuggestedActionsOnPostActivity);
}
function* clearSuggestedActionsOnPostActivity() {
yield takeEvery(
({ payload, type }) => (
type === POST_ACTIVITY_PENDING
&& payload.activity.type === 'message'
),
clearSuggestedActions
);
}
function* clearSuggestedActions() {
yield put(setSuggestedActions());
}

@@ -12,8 +12,10 @@ import {

export default function* () {
yield whileConnected(function* (directLine) {
yield observeEach(directLine.connectionStatus$, function* (connectionStatus) {
yield put(connectionStatusUpdate(connectionStatus));
yield put(setReferenceGrammarID(directLine.referenceGrammarId));
});
yield whileConnected(observeConnectionStatus);
}
function* observeConnectionStatus({ directLine }) {
yield observeEach(directLine.connectionStatus$, function* (connectionStatus) {
yield put(connectionStatusUpdate(connectionStatus));
yield put(setReferenceGrammarID(directLine.referenceGrammarId));
});
}

@@ -11,8 +11,10 @@ import {

import { decode } from 'jsonwebtoken';
import random from 'math-random';
import callUntil from './effects/callUntil';
import forever from './effects/forever';
import updateConnectionStatus, { UPDATE_CONNECTION_STATUS } from '../actions/updateConnectionStatus';
import createPromiseQueue from '../createPromiseQueue';
import { ConnectionStatus } from 'botframework-directlinejs';
import {

@@ -22,2 +24,3 @@ CONNECT,

CONNECT_REJECTED,
CONNECT_FULFILLING,
CONNECT_FULFILLED

@@ -29,55 +32,73 @@ } from '../actions/connect';

DISCONNECT_PENDING,
DISCONNECT_REJECTED,
DISCONNECT_FULFILLED
} from '../actions/disconnect';
// const UNINITIALIZED = 0;
// const CONNECTING = 1;
const ONLINE = 2;
// const EXPIRED_TOKEN = 3;
// const FAILED_TO_CONNECT = 4;
const ENDED = 5;
const {
Connecting: CONNECTING,
Online: ONLINE,
ExpiredToken: EXPIRED_TOKEN,
FailedToConnect: FAILED_TO_CONNECT,
Ended: ENDED
} = ConnectionStatus;
const DEFAULT_USER_ID = 'default-user';
function randomUserID() {
return `r_${ random().toString(36).substr(2, 10) }`;
}
export default function* () {
for (;;) {
const { payload: { directLine, userID } } = yield take(CONNECT);
const { token } = directLine;
const { user: userIDFromToken } = decode(token) || {};
function* observeAndPutConnectionStatusUpdate(directLine) {
const connectionStatusQueue = createPromiseQueue();
const connectionStatusSubscription = directLine.connectionStatus$.subscribe({
next: connectionStatusQueue.push
});
if (userIDFromToken) {
if (userID && userID !== userIDFromToken) {
console.warn('Web Chat: user ID is both specified in the Direct Line token and passed in, will use the user ID from the token.');
}
try {
for (;;) {
const connectionStatus = yield call(connectionStatusQueue.shift);
userID = userIDFromToken;
} else if (userID) {
if (typeof userID !== 'string') {
console.warn('Web Chat: user ID must be a string.');
userID = DEFAULT_USER_ID;
} else if (/^dl_/.test(userID)) {
console.warn('Web Chat: user ID prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.');
userID = DEFAULT_USER_ID;
}
} else {
// Only specify "default-user" if not found from token and not passed in
userID = DEFAULT_USER_ID;
yield put(updateConnectionStatus(connectionStatus));
}
} finally {
connectionStatusSubscription.unsubscribe();
}
}
const connectTask = yield fork(connectSaga, directLine, userID);
function negativeUpdateConnectionStatusAction({ payload, type }) {
if (type === UPDATE_CONNECTION_STATUS) {
const { connectionStatus } = payload;
yield take(DISCONNECT);
yield call(disconnectSaga, connectTask, directLine);
return (
connectionStatus !== CONNECTING
&& connectionStatus !== ONLINE
);
}
}
function* connectSaga(directLine, userID) {
const meta = { userID };
function rectifyUserID(directLine, userIDFromAction) {
const { token } = directLine;
const { user: userIDFromToken } = decode(token) || {};
yield put({ type: CONNECT_PENDING, meta });
if (userIDFromToken) {
if (userIDFromAction && userIDFromAction !== userIDFromToken) {
console.warn('Web Chat: user ID is both specified in the Direct Line token and passed in, will use the user ID from the token.');
}
const connectionStatusQueue = createPromiseQueue();
const connectionStatusSubscription = directLine.connectionStatus$.subscribe({ next: connectionStatusQueue.push });
return userIDFromToken;
} else if (userIDFromAction) {
if (typeof userIDFromAction !== 'string') {
console.warn('Web Chat: user ID must be a string.');
return randomUserID();
} else if (/^dl_/.test(userIDFromAction)) {
console.warn('Web Chat: user ID prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.');
return randomUserID();
}
} else {
return randomUserID();
}
return userIDFromAction;
}
function* connectSaga(directLine) {
// DirectLineJS start the connection only after the first subscriber for activity$, but not connectionStatus$

@@ -87,46 +108,92 @@ const activitySubscription = directLine.activity$.subscribe({ next: () => 0 });

try {
try {
yield callUntil(connectionStatusQueue.shift, [], connectionStatus => connectionStatus === ONLINE);
yield put({ type: CONNECT_FULFILLED, meta, payload: { directLine } });
} catch (err) {
yield put({ type: CONNECT_REJECTED, error: true, meta, payload: err });
} finally {
if (yield cancelled()) {
yield put({ type: CONNECT_REJECTED, error: true, meta, payload: new Error('cancelled') });
for (;;) {
const { payload: { connectionStatus } } = yield take(UPDATE_CONNECTION_STATUS);
// We will ignore DISCONNECT actions until we connect
if (connectionStatus === ONLINE) {
// TODO: [P2] DirectLineJS should kill the connection when we unsubscribe
// But currently in v3, DirectLineJS does not have this functionality
// Thus, we need to call "end()" explicitly
return () => {
activitySubscription.unsubscribe();
directLine.end();
};
} else if (
connectionStatus === ENDED
|| connectionStatus === EXPIRED_TOKEN
|| connectionStatus === FAILED_TO_CONNECT
) {
// If we receive anything negative, we will assume the connection is errored out
throw new Error('Failed to connect');
}
}
} finally {
if (yield cancelled()) {
activitySubscription.unsubscribe();
yield forever();
} finally {
// TODO: [P2] DirectLineJS should kill the connection when we unsubscribe
// But currently in v3, DirectLineJS does not have this functionality
// Thus, we need to call "end()" explicitly
directLine.end();
activitySubscription.unsubscribe();
connectionStatusSubscription.unsubscribe();
throw new Error('Cancelled');
}
}
}
function* disconnectSaga(connectTask, directLine) {
yield put({ type: DISCONNECT_PENDING });
export default function* () {
for (;;) {
const {
payload: {
directLine,
userID: userIDFromAction,
username
}
} = yield take(CONNECT);
const updateConnectionStatusTask = yield fork(observeAndPutConnectionStatusUpdate, directLine);
const connectionStatusQueue = createPromiseQueue();
const unsubscribe = directLine.connectionStatus$.subscribe({ next: connectionStatusQueue.push });
try {
const meta = {
userID: rectifyUserID(directLine, userIDFromAction),
username
};
// DirectLineJS should cancel underlying REST/WS when we cancel
// the connect task, which subsequently unsubscribe connectionStatus$
yield cancel(connectTask);
let endDirectLine;
try {
yield callUntil(connectionStatusQueue.shift, [], connectionStatus => connectionStatus === ENDED);
yield put({ type: DISCONNECT_FULFILLED });
} catch (err) {
yield put({ type: DISCONNECT_REJECTED, error: true, payload: err });
} finally {
if (yield cancelled()) {
yield put({ type: DISCONNECT_REJECTED, error: true, payload: new Error('cancelled') });
yield put({ type: CONNECT_PENDING, meta });
try {
endDirectLine = yield call(connectSaga, directLine);
} catch (err) {
yield put({ type: CONNECT_REJECTED, error: true, meta, payload: err });
continue;
}
// At this point, we established connection to Direct Line.
// Any errors from this point, we need to make sure we call endDirectLine() to release resources.
try {
yield put({ type: CONNECT_FULFILLING, meta, payload: { directLine } });
yield put({ type: CONNECT_FULFILLED, meta, payload: { directLine } });
const terminateAction = yield take([DISCONNECT, negativeUpdateConnectionStatusAction]);
// Even if the connection is interrupted, we will still emitting DISCONNECT_PENDING.
// This will makes handling logic easier. If CONNECT_FULFILLED, we guarantee DISCONNECT_PENDING.
yield put({ type: DISCONNECT_PENDING });
endDirectLine();
if (terminateAction.type === DISCONNECT) {
// For graceful disconnect, we wait until Direct Line say it is ended
yield take(negativeUpdateConnectionStatusAction);
}
} finally {
// It is meaningless to continue to use the Direct Line object even disconnect failed.
// We will still unsubscribe to incoming activities and consider Direct Line object abandoned.
yield put({ type: DISCONNECT_FULFILLED });
endDirectLine();
}
} finally {
yield cancel(updateConnectionStatusTask);
}
unsubscribe();
}
}

@@ -8,4 +8,4 @@ import {

import { CONNECT_FULFILLED } from '../../actions/connect';
import { DISCONNECT_FULFILLED } from '../../actions/disconnect';
import { CONNECT_FULFILLING } from '../../actions/connect';
import { DISCONNECT_PENDING } from '../../actions/disconnect';

@@ -15,6 +15,7 @@ export default function (fn) {

for (;;) {
const { meta: { userID }, payload: { directLine } } = yield take(CONNECT_FULFILLED);
const task = yield fork(fn, directLine, userID);
const { meta: { userID, username }, payload: { directLine } } = yield take(CONNECT_FULFILLING);
const task = yield fork(fn, { directLine, userID, username });
yield take(DISCONNECT_FULFILLED);
// When we receive DISCONNECT_PENDING, the Direct Line connection is tearing down and should not be used.
yield take(DISCONNECT_PENDING);
yield cancel(task);

@@ -21,0 +22,0 @@ }

@@ -6,4 +6,3 @@ import {

import observeEach from './effects/observeEach';
import whileConnected from './effects/whileConnected';
import updateIn from 'simple-update-in';

@@ -13,47 +12,50 @@ import incomingActivity from '../actions/incomingActivity';

function last(array, predicate) {
for (let i = array.length - 1; i >= 0; i--) {
const item = array[i];
import activityFromBot from '../definitions/activityFromBot';
if (predicate.call(array, item)) {
return item;
}
}
}
import observeEach from './effects/observeEach';
import whileConnected from './effects/whileConnected';
import { ofType as activitiesOfType } from '../selectors/activities';
export default function* () {
yield whileConnected(function* (directLine, userID) {
yield observeEach(directLine.activity$, function* (activity) {
activity = { ...activity };
yield whileConnected(observeActivity);
}
// Patch activity.from.role to make sure its either "bot", "user", or "channel"
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 = 'channel';
}
}
function* observeActivity({ directLine, userID }) {
yield observeEach(directLine.activity$, function* (activity) {
activity = patchActivityWithFromRole(activity, userID);
yield put(incomingActivity(activity));
yield put(incomingActivity(activity));
// Update suggested actions
const activities = yield select(({ activities }) => activities);
const lastMessageActivity = last(activities, ({ type }) => type === 'message');
// Update suggested actions
const messageActivities = yield select(activitiesOfType('message'));
const lastMessageActivity = messageActivities[messageActivities.length - 1];
if (
lastMessageActivity
&& lastMessageActivity.from
&& lastMessageActivity.from.role === 'bot'
) {
const { suggestedActions: { actions } = {} } = lastMessageActivity;
if (activityFromBot(lastMessageActivity)) {
const { suggestedActions: { actions } = {} } = lastMessageActivity;
yield put(setSuggestedActions(actions));
}
});
yield put(setSuggestedActions(actions));
}
});
}
function patchActivityWithFromRole(activity, userID) {
// Some activities, such as "ConversationUpdate", does not have "from" defined.
// And although "role" is defined in Direct Line spec, it was not sent over the wire.
// We normalize the activity here to simplify null-check and logic later.
// Patch activity.from.role to make sure its either "bot", "user", or "channel"
if (!activity.from) {
activity = updateIn(activity, ['from', 'role'], () => 'channel');
} else if (!activity.from.role) {
if (activity.from.id === userID) {
activity = updateIn(activity, ['from', 'role'], () => 'user');
} else if (activity.from.id) {
activity = updateIn(activity, ['from', 'role'], () => 'bot');
} else {
activity = updateIn(activity, ['from', 'role'], () => 'channel');
}
}
return activity;
}

@@ -5,16 +5,18 @@ import {

cancelled,
fork,
put,
race,
select,
take
take,
takeEvery
} from 'redux-saga/effects';
import sleep from '../utils/sleep';
import observeOnce from './effects/observeOnce';
import whileConnected from './effects/whileConnected';
import languageSelector from '../selectors/language';
import sendTimeoutSelector from '../selectors/sendTimeout';
import deleteKey from '../utils/deleteKey';
import getTimestamp from '../utils/getTimestamp';
import sleep from '../utils/sleep';
import uniqueID from '../utils/uniqueID';

@@ -32,13 +34,13 @@

export default function* () {
yield whileConnected(function* (directLine, userID) {
for (let numActivitiesPosted = 0;; numActivitiesPosted++) {
const action = yield take(POST_ACTIVITY);
yield whileConnected(function* ({ directLine, userID, username }) {
let numActivitiesPosted = 0;
yield fork(postActivity, directLine, userID, numActivitiesPosted, action);
}
yield takeEvery(POST_ACTIVITY, function* (action) {
yield* postActivity(directLine, userID, username, numActivitiesPosted++, action);
});
});
}
function* postActivity(directLine, userID, numActivitiesPosted, { payload: { activity } }) {
const locale = yield select(({ language }) => language);
function* postActivity(directLine, userID, username, numActivitiesPosted, { meta: { method }, payload: { activity } }) {
const locale = yield select(languageSelector);
const { attachments, channelData: { clientActivityID = uniqueID() } = {} } = activity;

@@ -60,2 +62,3 @@

id: userID,
name: username,
role: 'user'

@@ -78,5 +81,5 @@ },

const meta = { clientActivityID };
const meta = { clientActivityID, method };
yield put({ type: POST_ACTIVITY_PENDING, payload: { activity }, meta });
yield put({ type: POST_ACTIVITY_PENDING, meta, payload: { activity } });

@@ -103,3 +106,3 @@ try {

const sendTimeout = yield select(({ sendTimeout }) => sendTimeout);
const sendTimeout = yield select(sendTimeoutSelector);

@@ -106,0 +109,0 @@ const { send: { echoBack } } = yield race({

import {
put,
take
takeEvery
} from 'redux-saga/effects';
import mime from 'mime';
import mime from '../utils/mime-wrapper';

@@ -12,3 +12,2 @@ import whileConnected from './effects/whileConnected';

import postActivity from '../actions/postActivity';
import stopSpeakingActivity from '../actions/stopSpeakingActivity';

@@ -18,23 +17,27 @@ const getType = mime.getType.bind(mime);

export default function* () {
yield whileConnected(function* () {
for (;;) {
const { payload: { files } } = yield take(SEND_FILES);
yield whileConnected(sendFilesToPostActivity);
}
if (files.length) {
yield put(postActivity({
attachments: [].map.call(files, file => ({
contentType: getType(file.name) || 'application/octet-stream',
contentUrl: file.url,
name: file.name
})),
channelData: {
attachmentSizes: [].map.call(files, file => file.size)
},
type: 'message'
}));
function* sendFilesToPostActivity() {
yield takeEvery(
({ payload, type }) => (
type === SEND_FILES
&& payload.files.length
),
postActivityWithFiles
);
}
yield put(stopSpeakingActivity());
}
}
});
function* postActivityWithFiles({ payload: { files } }) {
yield put(postActivity({
attachments: [].map.call(files, ({ name, url }) => ({
contentType: getType(name) || 'application/octet-stream',
contentUrl: url,
name: name
})),
channelData: {
attachmentSizes: [].map.call(files, ({ size }) => size)
},
type: 'message'
}));
}
import {
put,
take
takeEvery
} from 'redux-saga/effects';

@@ -10,25 +10,20 @@

import postActivity from '../actions/postActivity';
import startSpeakingActivity from '../actions/startSpeakingActivity';
import stopSpeakingActivity from '../actions/stopSpeakingActivity';
export default function* () {
yield whileConnected(function* () {
for (;;) {
const { payload: { text, via } } = yield take(SEND_MESSAGE);
yield whileConnected(sendMessageToPostActivity);
}
if (text) {
yield put(postActivity({
text,
textFormat: 'plain',
type: 'message'
}));
function* sendMessageToPostActivity() {
yield takeEvery(({ payload, type }) => (
type === SEND_MESSAGE
&& payload.text
), postActivityWithMessage);
}
if (via === 'speech') {
yield put(startSpeakingActivity());
} else {
yield put(stopSpeakingActivity());
}
}
}
});
function* postActivityWithMessage({ payload: { method, text } }) {
yield put(postActivity({
text,
textFormat: 'plain',
type: 'message'
}, method));
}
import {
put,
take
takeEvery
} from 'redux-saga/effects';
import whileConnected from './effects/whileConnected';
import { SEND_POST_BACK } from '../actions/sendPostBack';
import postActivity from '../actions/postActivity';
import whileConnected from './effects/whileConnected';
export default function* () {
yield whileConnected(function* () {
for (;;) {
const { payload: { value } } = yield take(SEND_POST_BACK);
yield whileConnected(sendPostBackToPostActivity);
}
if (value) {
yield put(postActivity({
channelData: {
postBack: true
},
text: typeof value === 'string' ? value : undefined,
type: 'message',
value: typeof value !== 'string' ? value : undefined
}));
}
}
});
function* sendPostBackToPostActivity() {
yield takeEvery(
({ payload, type }) => (
type === SEND_POST_BACK
&& payload.value
),
postActivityWithPostBack
);
}
function* postActivityWithPostBack({ payload: { value } }) {
yield put(postActivity({
channelData: {
postBack: true
},
text: typeof value === 'string' ? value : undefined,
type: 'message',
value: typeof value !== 'string' ? value : undefined
}));
}
import {
cancel,
fork,
put,
select,
take
takeEvery
} from 'redux-saga/effects';
import whileConnected from './effects/whileConnected';
import { MARK_ACTIVITY } from '../actions/markActivity';
import { START_SPEAKING_ACTIVITY } from '../actions/startSpeakingActivity';
import { STOP_SPEAKING_ACTIVITY } from '../actions/stopSpeakingActivity';
import startDictate from '../actions/startDictate';
export default function* () {
yield whileConnected(function* (_, userID) {
for (;;) {
yield take(START_SPEAKING_ACTIVITY);
import speakingActivity from '../definitions/speakingActivity';
const task = yield fork(startDictateAfterSpeakActivitySaga, userID);
import whileConnected from './effects/whileConnected';
import whileSpeakIncomingActivity from './effects/whileSpeakIncomingActivity';
yield take(STOP_SPEAKING_ACTIVITY);
yield cancel(task);
}
import { ofID as activitiesOfID } from '../selectors/activities';
export default function* () {
yield whileConnected(function* () {
yield whileSpeakIncomingActivity(startDictateAfterSpeakActivity);
});
}
function* startDictateAfterSpeakActivitySaga() {
for (;;) {
const { payload: { activityID } } = yield take(({ payload, type }) => type === MARK_ACTIVITY && payload.name === 'speak' && payload.value === false);
const activities = yield select(({ activities }) => activities);
function* startDictateAfterSpeakActivity() {
yield takeEvery(
({ payload, type }) => (
type === MARK_ACTIVITY
&& payload.name === 'speak'
&& payload.value === false
),
startDictateAfterAllActivitiesSpoken
);
}
if (!activities.some(activity => activity.id !== activityID && activity.channelData && activity.channelData.speak === true)) {
yield put(startDictate());
}
function* startDictateAfterAllActivitiesSpoken({ payload: { activityID } }) {
const activities = yield select(activitiesOfID(activityID));
const [spokenActivity] = activities;
if (
spokenActivity
&& spokenActivity.inputHint !== 'ignoringInput'
// Checks if there are no more activities that will be synthesis
&& !activities.some(
activity => activity.id !== activityID && speakingActivity(activity)
)
) {
// We honor input hint based on this article
// https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-add-input-hints?view=azure-bot-service-4.0&tabs=cs
yield put(startDictate());
}
}
import {
put,
select,
take
takeEvery
} from 'redux-saga/effects';
import whileConnected from './effects/whileConnected';
import { SUBMIT_SEND_BOX } from '../actions/submitSendBox';

@@ -13,14 +11,19 @@ import sendMessage from '../actions/sendMessage';

import whileConnected from './effects/whileConnected';
import sendBoxValueSelector from '../selectors/sendBoxValue';
export default function* () {
yield whileConnected(function* () {
for (;;) {
const { payload: { via } } = yield take(SUBMIT_SEND_BOX);
const sendBoxValue = yield select(({ sendBoxValue }) => sendBoxValue);
yield whileConnected(submitSendBox);
}
if (sendBoxValue) {
yield put(sendMessage(sendBoxValue, via));
yield put(setSendBox('', 'keyboard'));
}
function* submitSendBox() {
yield takeEvery(SUBMIT_SEND_BOX, function* ({ payload: { method } }) {
const sendBoxValue = yield select(sendBoxValueSelector);
if (sendBoxValue) {
yield put(sendMessage(sendBoxValue, method));
yield put(setSendBox(''));
}
});
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc