botframework-webchat-core
Advanced tools
Comparing version 4.2.1-master.164a155 to 4.2.1-master.1a80c5e
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = _default; | ||
exports.CONNECT_FULFILLED = exports.CONNECT_REJECTED = exports.CONNECT_PENDING = exports.CONNECT = void 0; | ||
exports.CONNECT_FULFILLED = exports.CONNECT_FULFILLING = exports.CONNECT_REJECTED = exports.CONNECT_PENDING = exports.CONNECT = void 0; | ||
var CONNECT = 'DIRECT_LINE/CONNECT'; | ||
@@ -15,2 +15,4 @@ exports.CONNECT = CONNECT; | ||
exports.CONNECT_REJECTED = CONNECT_REJECTED; | ||
var CONNECT_FULFILLING = "".concat(CONNECT, "_FULFILLING"); | ||
exports.CONNECT_FULFILLING = CONNECT_FULFILLING; | ||
var CONNECT_FULFILLED = "".concat(CONNECT, "_FULFILLED"); | ||
@@ -30,2 +32,2 @@ exports.CONNECT_FULFILLED = CONNECT_FULFILLED; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL2Nvbm5lY3QuanMiXSwibmFtZXMiOlsiQ09OTkVDVCIsIkNPTk5FQ1RfUEVORElORyIsIkNPTk5FQ1RfUkVKRUNURUQiLCJDT05ORUNUX0ZVTEZJTExFRCIsImRpcmVjdExpbmUiLCJ1c2VySUQiLCJ0eXBlIiwicGF5bG9hZCJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBLElBQU1BLE9BQU8sR0FBRyxxQkFBaEI7O0FBQ0EsSUFBTUMsZUFBZSxhQUFPRCxPQUFQLGFBQXJCOztBQUNBLElBQU1FLGdCQUFnQixhQUFPRixPQUFQLGNBQXRCOztBQUNBLElBQU1HLGlCQUFpQixhQUFPSCxPQUFQLGVBQXZCOzs7QUFFZSx3QkFBa0M7QUFBQSxNQUF0QkksVUFBc0IsUUFBdEJBLFVBQXNCO0FBQUEsTUFBVkMsTUFBVSxRQ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1xuICBDT05ORUNULFxuICBDT05ORUNUX1BFTkRJTkcsXG4gIENPTk5FQ1RfUkVKRUNURUQsXG4gIENPTk5FQ1RfRlVMRklMTElORyxcbiAgQ09OTkVDVF9GVUxGSUxMRURcbn1cbiJdfQ== |
@@ -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 @@ activity: activity | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3Bvc3RBY3Rpdml0eS5qcyJdLCJuYW1lcyI6WyJQT1NUX0FDVElWSVRZIiwiUE9TVF9BQ1RJVklUWV9GVUxGSUxMRUQiLCJGVUxGSUxMRUQiLCJQT1NUX0FDVElWSVRZX1BFTkRJTkciLCJQRU5ESU5HIiwiUE9TVF9BQ1RJVklUWV9SRUpFQ1RFRCIsIlJFSkVDVEVEIiwiYWN0aXZpdHkiLCJ0eXBlIiwicGF5bG9hZCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQTs7QUFFQSxJQUFNQSxhQUFhLEdBQUcsMkJBQXRCOztBQUNPLElBQU1DLHVCQUF1QixhQUFPRCxhQUFQLGNBQTBCRSxpQ0FBMUIsQ0FBN0I7O0FBQ0EsSUFBTUMscUJBQXFCLGFBQU9ILGFBQVAsY0FBMEJJLCtCQUExQixDQUEzQjs7QUFDQSxJQUFNQyxzQkFBc0IsYUFBT0wsYUFBUCxjQUEwQk0sZ0NBQTFCLENBQTVCOzs7QUFFUSxrQkFBVUMsUUFBVixFQUFvQjtBQUNqQyxTQUFPO0FBQ0xDLElBQUFBLElBQUksRUFBRVIsYUFERDtBQUVMUyxJQUFBQSxPQUFPLEVBQUU7QUFBRUYsTUFBQUEs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F9BQ1RJVklUWSB9XyR7IFJFSkVDVEVEIH1gO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiAoYWN0aXZpdHksIG1ldGhvZCA9ICdrZXlib2FyZCcpIHtcbiAgcmV0dXJuIHtcbiAgICB0eXBlOiBQT1NUX0FDVElWSVRZLFxuICAgIG1ldGE6IHsgbWV0aG9kIH0sXG4gICAgcGF5bG9hZDogeyBhY3Rpdml0eSB9XG4gIH07XG59XG5cbmV4cG9ydCB7XG4gIFBPU1RfQUNUSVZJVFlcbn1cbiJdfQ== |
@@ -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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3NldFNlbmRCb3guanMiXSwibmFtZXMiOlsiU0VUX1NFTkRfQk9YIiwidGV4dCIsInZpYSIsInR5cGUiLCJwYXlsb2FkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsSUFBTUEsWUFBWSxHQUFHLHVCQUFyQjs7O0FBRWUsa0JBQVVDLElBQVYsRUFBZ0JDLEdBQWhCLEVBQXFCO0FBQ2xDLFNBQU87QUFDTEMsSUFBQUEsSUFBSSxFQUFFSCxZQUREO0FBRUxJLElBQUFBLE9BQU8sRUFBRTtBQUFFSCxNQUFBQSxJQUFJLEVBQUpBLElBQUY7QUFBUUMsTUFBQUEsR0FBRyxFQUFIQTtBQUFSO0FBRkosR0FBUDtBQUlEIiwic291cmNlc0NvbnRlbnQiOlsiY29uc3QgU0VUX1NFTkRfQk9YID0gJ1dFQl9DSEFUL1NFVF9TRU5EX0JPWCc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uICh0ZXh0LCB2aWEpIHtcbiAgcmV0dXJuIHtcbiAgICB0eXBlOiBTRVRfU0VORF9CT1gsXG4gICAgcGF5bG9hZDogeyB0ZXh0LCB2aWEgfVxuICB9O1xufVxuXG5leHBvcnQgeyBTRVRfU0VORF9CT1ggfVxuIl19 | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3NldFNlbmRCb3guanMiXSwibmFtZXMiOlsiU0VUX1NFTkRfQk9YIiwidGV4dCIsInR5cGUiLCJwYXlsb2FkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsSUFBTUEsWUFBWSxHQUFHLHVCQUFyQjs7O0FBRWUsa0JBQVVDLElBQVYsRUFBZ0I7QUFDN0IsU0FBTztBQUNMQyxJQUFBQSxJQUFJLEVBQUVGLFlBREQ7QUFFTEcsSUFBQUEsT0FBTyxFQUFFO0FBQUVGLE1BQUFBLElBQUksRUFBSkE7QUFBRjtBQUZKLEdBQVA7QUFJRCIsInNvdXJjZXNDb250ZW50IjpbImNvbnN0IFNFVF9TRU5EX0JPWCA9ICdXRUJfQ0hBVC9TRVRfU0VORF9CT1gnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiAodGV4dCkge1xuICByZXR1cm4ge1xuICAgIHR5cGU6IFNFVF9TRU5EX0JPWCxcbiAgICBwYXlsb2FkOiB7IHRleHQgfVxuICB9O1xufVxuXG5leHBvcnQgeyBTRVRfU0VORF9CT1ggfVxuIl19 |
@@ -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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3N1Ym1pdFNlbmRCb3guanMiXSwibmFtZXMiOlsiU1VCTUlUX1NFTkRfQk9YIiwic3VibWl0U2VuZEJveCIsInZpYSIsInR5cGUiLCJwYXlsb2FkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsSUFBTUEsZUFBZSxHQUFHLDBCQUF4Qjs7O0FBRWUsU0FBU0MsYUFBVCxDQUF1QkMsR0FBdkIsRUFBNEI7QUFDekMsU0FBTztBQUNMQyxJQUFBQSxJQUFJLEVBQUVILGVBREQ7QUFFTEksSUFBQUEsT0FBTyxFQUFFO0FBQUVGLE1BQUFBLEdBQUcsRUF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6IHsgbWV0aG9kIH1cbiAgfTtcbn1cblxuZXhwb3J0IHsgU1VCTUlUX1NFTkRfQk9YIH1cbiJdfQ== |
@@ -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", { | ||
@@ -138,2 +150,4 @@ enumerable: true, | ||
var _sendEvent = _interopRequireDefault(require("./actions/sendEvent")); | ||
var _sendFiles = _interopRequireDefault(require("./actions/sendFiles")); | ||
@@ -143,2 +157,4 @@ | ||
var _sendMessageBack = _interopRequireDefault(require("./actions/sendMessageBack")); | ||
var _sendPostBack = _interopRequireDefault(require("./actions/sendPostBack")); | ||
@@ -177,4 +193,4 @@ | ||
exports.Constants = Constants; | ||
var version = "4.2.1-master.164a155"; | ||
var version = "4.2.1-master.1a80c5e"; | ||
exports.version = version; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJDb25zdGFudHMiLCJBY3Rpdml0eUNsaWVudFN0YXRlIiwiRGljdGF0ZVN0YXRlIiwidmVyc2lvbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQ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G4gIHNlbmRQb3N0QmFjayxcbiAgc2V0RGljdGF0ZUludGVyaW1zLFxuICBzZXREaWN0YXRlU3RhdGUsXG4gIHNldExhbmd1YWdlLFxuICBzZXRTZW5kQm94LFxuICBzZXRTZW5kVGltZW91dCxcbiAgc2V0U2VuZFR5cGluZyxcbiAgc3RhcnREaWN0YXRlLFxuICBzdGFydFNwZWFraW5nQWN0aXZpdHksXG4gIHN0b3BEaWN0YXRlLFxuICBzdG9wU3BlYWtpbmdBY3Rpdml0eSxcbiAgc3VibWl0U2VuZEJveCxcbiAgdmVyc2lvblxufVxuIl19 |
@@ -10,4 +10,5 @@ declare const _default: import("redux").Reducer<{ | ||
sendTimeout: {}; | ||
sendTyping: {}; | ||
suggestedActions: {}; | ||
}, import("redux").AnyAction>; | ||
export default _default; |
@@ -28,2 +28,4 @@ "use strict"; | ||
var _sendTyping = _interopRequireDefault(require("./reducers/sendTyping")); | ||
var _suggestedActions = _interopRequireDefault(require("./reducers/suggestedActions")); | ||
@@ -40,2 +42,3 @@ | ||
sendTimeout: _sendTimeout.default, | ||
sendTyping: _sendTyping.default, | ||
suggestedActions: _suggestedActions.default | ||
@@ -45,2 +48,2 @@ }); | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9yZWR1Y2VyLnRzIl0sIm5hbWVzIjpbImFjdGl2aXRpZXMiLCJkaWN0YXRlSW50ZXJpbXMiLCJkaWN0YXRlU3RhdGUiLCJsYW5ndWFnZSIsInJlYWR5U3RhdGUiLCJyZWZlcmVuY2VHcmFtbWFySUQiLCJzZW5kQm94VmFsdWUiLCJzZW5kVGltZW91dCIsInN1Z2dlc3RlZEFjdGlvbnMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBOztBQUVBOztBQUNBOztBQUNBOztBQUNBOztBQUNBOztBQUNBOztBQUNBOztBQUNBOztBQUNBOztlQUVlLDRCQUFnQj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aWVzLFxuICBkaWN0YXRlSW50ZXJpbXMsXG4gIGRpY3RhdGVTdGF0ZSxcbiAgbGFuZ3VhZ2UsXG4gIHJlYWR5U3RhdGUsXG4gIHJlZmVyZW5jZUdyYW1tYXJJRCxcbiAgc2VuZEJveFZhbHVlLFxuICBzZW5kVGltZW91dCxcbiAgc2VuZFR5cGluZyxcbiAgc3VnZ2VzdGVkQWN0aW9uc1xufSlcbiJdfQ== |
@@ -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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZWR1Y2Vycy9hY3Rpdml0aWVzLmpzIl0sIm5hbWVzIjpbIkRFRkFVTFRfU1RBVEUiLCJnZXRDbGllbnRBY3Rpdml0eUlEIiwiY2hhbm5lbERhdGEiLCJjbGllbnRBY3Rpdml0eUlEIiwiZmluZEJ5Q2xpZW50QWN0aXZpdHlJRCIsImFjdGl2aXR5IiwidXBzZXJ0QWN0aXZpdHlXaXRoU29ydCIsImFjdGl2aXRpZXMiLCJuZXh0QWN0aXZpdHkiLCJuZXh0Q2xpZW50QWN0aXZpdHlJRCIsImZyb20iLCJuZXh0RnJvbUlEIiwiaWQiLCJuZXh0VGltZXN0YW1wIiwiRGF0ZSIsInBhcnNlIiwidGltZXN0YW1wIiwibmV4dEFjdGl2aXRpZXMiLCJmaWx0ZXIiLCJ0eXBlIiwiaW5kZXhUb0luc2VydCIsImZpbmRJbmRleCIsInN0YXRlI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V0YS5jbGllbnRBY3Rpdml0eUlEKSwgJ2NoYW5uZWxEYXRhJywgJ3N0YXRlJ10sICgpID0+IFNFTkRfRkFJTEVEKTtcbiAgICAgIGJyZWFrO1xuXG4gICAgY2FzZSBQT1NUX0FDVElWSVRZX0ZVTEZJTExFRDpcbiAgICAgIHN0YXRlID0gdXBkYXRlSW4oc3RhdGUsIFtmaW5kQnlDbGllbnRBY3Rpdml0eUlEKG1ldGEuY2xpZW50QWN0aXZpdHlJRCldLCBhY3Rpdml0eSA9PlxuICAgICAgICAvLyBXZSB3aWxsIHJlcGxhY2UgdGhlIGFjdGl2aXR5IHdpdGggdGhlIHZlcnNpb24gZnJvbSB0aGUgc2VydmVyXG4gICAgICAgIHVwZGF0ZUluKHBheWxvYWQuYWN0aXZpdHksIFsnY2hhbm5lbERhdGEnLCAnc3RhdGUnXSwgKCkgPT4gU0VOVClcbiAgICAgICk7XG5cbiAgICAgIGJyZWFrO1xuXG4gICAgY2FzZSBJTkNPTUlOR19BQ1RJVklUWTpcbiAgICAgIC8vIFVwZGF0ZUFjdGl2aXR5IGlzIG5vdCBzdXBwb3J0ZWQgcmlnaHQgbm93IGJlY2F1c2Ugd2UgaWdub3JlIGR1cGxpY2F0ZWQgYWN0aXZpdHkgSURcbiAgICAgIGlmICghfnN0YXRlLmZpbmRJbmRleCgoeyBpZCB9KSA9PiBpZCA9PT0gcGF5bG9hZC5hY3Rpdml0eS5pZCkpIHtcbiAgICAgICAgc3RhdGUgPSB1cHNlcnRBY3Rpdml0eVdpdGhTb3J0KHN0YXRlLCBwYXlsb2FkLmFjdGl2aXR5KTtcbiAgICAgIH1cblxuICAgICAgYnJlYWs7XG5cbiAgICBkZWZhdWx0OiBicmVhaztcbiAgfVxuXG4gIHJldHVybiBzdGF0ZTtcbn1cbiJdfQ== |
@@ -22,8 +22,14 @@ "use strict"; | ||
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,2 +39,4 @@ | ||
var _sendMessageBackToPostActivitySaga = _interopRequireDefault(require("./sagas/sendMessageBackToPostActivitySaga")); | ||
var _sendPostBackToPostActivitySaga = _interopRequireDefault(require("./sagas/sendPostBackToPostActivitySaga")); | ||
@@ -40,6 +48,8 @@ | ||
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")); | ||
@@ -73,7 +83,7 @@ | ||
_context.next = 10; | ||
return (0, _effects.fork)(_incomingTypingSaga.default); | ||
return (0, _effects.fork)(_markActivityForSpeakOnIncomingActivityFromOthersSaga.default); | ||
case 10: | ||
_context.next = 12; | ||
return (0, _effects.fork)(_markActivityForSpeakSaga.default); | ||
return (0, _effects.fork)(_markAllAsSpokenOnStopSpeakActivitySaga.default); | ||
@@ -86,33 +96,53 @@ case 12: | ||
_context.next = 16; | ||
return (0, _effects.fork)(_sendFilesToPostActivitySaga.default); | ||
return (0, _effects.fork)(_removeIncomingTypingAfterIntervalSaga.default); | ||
case 16: | ||
_context.next = 18; | ||
return (0, _effects.fork)(_sendMessageToPostActivitySaga.default); | ||
return (0, _effects.fork)(_sendConversationUpdateOnConnectSaga.default); | ||
case 18: | ||
_context.next = 20; | ||
return (0, _effects.fork)(_sendPostBackToPostActivitySaga.default); | ||
return (0, _effects.fork)(_sendEventToPostActivitySaga.default); | ||
case 20: | ||
_context.next = 22; | ||
return (0, _effects.fork)(_sendTypingOnSetSendBoxSaga.default); | ||
return (0, _effects.fork)(_sendFilesToPostActivitySaga.default); | ||
case 22: | ||
_context.next = 24; | ||
return (0, _effects.fork)(_startDictateAfterSpeakActivitySaga.default); | ||
return (0, _effects.fork)(_sendMessageToPostActivitySaga.default); | ||
case 24: | ||
_context.next = 26; | ||
return (0, _effects.fork)(_stopDictateOnCardAction.default); | ||
return (0, _effects.fork)(_sendMessageBackToPostActivitySaga.default); | ||
case 26: | ||
_context.next = 28; | ||
return (0, _effects.fork)(_stopSpeakActivityOnInputSaga.default); | ||
return (0, _effects.fork)(_sendPostBackToPostActivitySaga.default); | ||
case 28: | ||
_context.next = 30; | ||
return (0, _effects.fork)(_sendTypingOnSetSendBoxSaga.default); | ||
case 30: | ||
_context.next = 32; | ||
return (0, _effects.fork)(_startDictateAfterSpeakActivitySaga.default); | ||
case 32: | ||
_context.next = 34; | ||
return (0, _effects.fork)(_startSpeakActivityOnPostActivitySaga.default); | ||
case 34: | ||
_context.next = 36; | ||
return (0, _effects.fork)(_stopDictateOnCardActionSaga.default); | ||
case 36: | ||
_context.next = 38; | ||
return (0, _effects.fork)(_stopSpeakingActivityOnInputSaga.default); | ||
case 38: | ||
_context.next = 40; | ||
return (0, _effects.fork)(_submitSendBoxSaga.default); | ||
case 30: | ||
case 40: | ||
case "end": | ||
@@ -124,2 +154,2 @@ return _context.stop(); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9zYWdhcy5qcyJdLCJuYW1lcyI6WyJjbGVhclN1Z2dlc3RlZEFjdGlvbnNPblBvc3RBY3Rpdml0eVNhZ2EiLCJjb25uZWN0aW9uU3RhdHVzVXBkYXRlU2FnYSIsImNvbm5lY3RTYWdhIiwiaW5jb21pbmdBY3Rpdml0eVNhZ2EiLCJpbmNvbWluZ1R5cGluZ1NhZ2EiLCJtYXJrQWN0aXZpdHlGb3JTcGVha1NhZ2EiLCJwb3N0QWN0aXZpdHlTYWdhIiwic2VuZEZpbGVzVG9Qb3N0QWN0aXZpdHlTYWdhIiwic2VuZE1lc3NhZ2VUb1Bvc3RBY3Rpdml0eVNhZ2EiLCJzZW5kUG9zdEJhY2tUb1Bvc3RBY3Rpdml0eVNhZ2EiLCJzZW5kVHlwaW5nT25TZXRTZW5kQm94U2FnYSIsInN0YXJ0RGljdGF0ZUFmdGVyU3BlYWtBY3Rpdml0eVNhZ2EiLCJzdG9wRGljdGF0ZU9uQ2FyZEFjdGlvbiIsInN0b3BTcGVha0FjdGl2aXR5T25JbnB1dFNhZ2EiLCJzdWJtaXRTZW5kQm94U2FnYSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQTs7QUFFQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7Ozs7O0FBRWU7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ2IsaUJBQU0sbUJBQUtBLGdEQUFMLENBQU47O0FBRG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ZCBmb3JrKG1hcmtBbGxBc1Nwb2tlbk9uU3RvcFNwZWFrQWN0aXZpdHlTYWdhKTtcbiAgeWllbGQgZm9yayhwb3N0QWN0aXZpdHlTYWdhKTtcbiAgeWllbGQgZm9yayhyZW1vdmVJbmNvbWluZ1R5cGluZ0FmdGVySW50ZXJ2YWxTYWdhKTtcbiAgeWllbGQgZm9yayhzZW5kQ29udmVyc2F0aW9uVXBkYXRlT25Db25uZWN0U2FnYSk7XG4gIHlpZWxkIGZvcmsoc2VuZEV2ZW50VG9Qb3N0QWN0aXZpdHlTYWdhKTtcbiAgeWllbGQgZm9yayhzZW5kRmlsZXNUb1Bvc3RBY3Rpdml0eVNhZ2EpO1xuICB5aWVsZCBmb3JrKHNlbmRNZXNzYWdlVG9Qb3N0QWN0aXZpdHlTYWdhKTtcbiAgeWllbGQgZm9yayhzZW5kTWVzc2FnZUJhY2tUb1Bvc3RBY3Rpdml0eVNhZ2EpO1xuICB5aWVsZCBmb3JrKHNlbmRQb3N0QmFja1RvUG9zdEFjdGl2aXR5U2FnYSk7XG4gIHlpZWxkIGZvcmsoc2VuZFR5cGluZ09uU2V0U2VuZEJveFNhZ2EpO1xuICB5aWVsZCBmb3JrKHN0YXJ0RGljdGF0ZUFmdGVyU3BlYWtBY3Rpdml0eVNhZ2EpO1xuICB5aWVsZCBmb3JrKHN0YXJ0U3BlYWtBY3Rpdml0eU9uUG9zdEFjdGl2aXR5U2FnYSk7XG4gIHlpZWxkIGZvcmsoc3RvcERpY3RhdGVPbkNhcmRBY3Rpb25TYWdhKTtcbiAgeWllbGQgZm9yayhzdG9wU3BlYWtpbmdBY3Rpdml0eU9uSW5wdXRTYWdhKTtcbiAgeWllbGQgZm9yayhzdWJtaXRTZW5kQm94U2FnYSk7XG59XG4iXX0= |
@@ -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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9jbGVhclN1Z2dlc3RlZEFjdGlvbnNPblBvc3RBY3Rpdml0eVNhZ2EuanMiXSwibmFtZXMiOlsicGF5bG9hZCIsInR5cGUiLCJQT1NUX0FDVElWSVRZX1BFTkRJTkciLCJhY3Rpdml0eSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQTs7QUFLQTs7QUFDQTs7QUFDQTs7Ozs7O0FBRWU7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ2IsaUJBQU07QUFBQTtBQUFBLG9DQUFlO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUVqQiwyQkFBTSxtQkFBSztBQUFBLDBCQUFHQSxPQUFILFFBQUdBLE9BQUg7QUFBQSwwQkFBWUMsSUFBWixRQUFZQSxJQUFaO0FBQUEsNkJBQXVCQSxJQUFJLEtBQUtDLG1DQUFULElBQWtDRixPQUFPLENBQUNHLFFBQVIsQ0FBaUJGLElBQWpCLEtBQTBCLFNBQW5GO0FBQUEscUJBQUwsQ0FBTjs7QUFGaUI7QUFBQTtBQUdqQiwyQkFBTSx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yB9IGZyb20gJy4uL2FjdGlvbnMvcG9zdEFjdGl2aXR5JztcbmltcG9ydCBzZXRTdWdnZXN0ZWRBY3Rpb25zIGZyb20gJy4uL2FjdGlvbnMvc2V0U3VnZ2VzdGVkQWN0aW9ucyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKiAoKSB7XG4gIHlpZWxkIHdoaWxlQ29ubmVjdGVkKGNsZWFyU3VnZ2VzdGVkQWN0aW9uc09uUG9zdEFjdGl2aXR5KTtcbn1cblxuZnVuY3Rpb24qIGNsZWFyU3VnZ2VzdGVkQWN0aW9uc09uUG9zdEFjdGl2aXR5KCkge1xuICB5aWVsZCB0YWtlRXZlcnkoXG4gICAgKHsgcGF5bG9hZCwgdHlwZSB9KSA9PiAoXG4gICAgICB0eXBlID09PSBQT1NUX0FDVElWSVRZX1BFTkRJTkdcbiAgICAgICYmIHBheWxvYWQuYWN0aXZpdHkudHlwZSA9PT0gJ21lc3NhZ2UnXG4gICAgKSxcbiAgICBjbGVhclN1Z2dlc3RlZEFjdGlvbnNcbiAgKTtcbn1cblxuZnVuY3Rpb24qIGNsZWFyU3VnZ2VzdGVkQWN0aW9ucygpIHtcbiAgeWllbGQgcHV0KHNldFN1Z2dlc3RlZEFjdGlvbnMoKSk7XG59XG4iXX0= |
@@ -8,3 +8,3 @@ "use strict"; | ||
}); | ||
exports.default = _callee3; | ||
exports.default = _callee; | ||
@@ -25,13 +25,32 @@ 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(directLine) { | ||
return _regenerator.default.wrap(function observeConnectionStatus$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
_context3.next = 2; | ||
return (0, _whileConnected.default)( | ||
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 +61,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": | ||
@@ -78,4 +81,4 @@ return _context2.stop(); | ||
} | ||
}, _marked, this); | ||
}, _marked2, this); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9jb25uZWN0aW9uU3RhdHVzVXBkYXRlU2FnYS5qcyJdLCJuYW1lcyI6WyJkaXJlY3RMaW5lIiwiY29ub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ZUVhY2goZGlyZWN0TGluZS5jb25uZWN0aW9uU3RhdHVzJCwgZnVuY3Rpb24qIChjb25uZWN0aW9uU3RhdHVzKSB7XG4gICAgeWllbGQgcHV0KGNvbm5lY3Rpb25TdGF0dXNVcGRhdGUoY29ubmVjdGlvblN0YXR1cykpO1xuICAgIHlpZWxkIHB1dChzZXRSZWZlcmVuY2VHcmFtbWFySUQoZGlyZWN0TGluZS5yZWZlcmVuY2VHcmFtbWFySWQpKTtcbiAgfSk7XG59XG4iXX0= |
@@ -16,2 +16,4 @@ "use strict"; | ||
var _mathRandom = _interopRequireDefault(require("math-random")); | ||
var _callUntil = _interopRequireDefault(require("./effects/callUntil")); | ||
@@ -43,4 +45,7 @@ | ||
var ENDED = 5; | ||
var DEFAULT_USER_ID = 'default-user'; | ||
function randomUserID() { | ||
return "r_".concat((0, _mathRandom.default)().toString(36).substr(2, 10)); | ||
} | ||
function _callee() { | ||
@@ -73,10 +78,10 @@ var _ref, _ref$payload, directLine, userID, token, _ref2, userIDFromToken, connectTask; | ||
console.warn('Web Chat: user ID must be a string.'); | ||
userID = DEFAULT_USER_ID; | ||
userID = randomUserID(); | ||
} 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; | ||
userID = randomUserID(); | ||
} | ||
} else { | ||
// Only specify "default-user" if not found from token and not passed in | ||
userID = DEFAULT_USER_ID; | ||
userID = randomUserID(); | ||
} | ||
@@ -144,2 +149,12 @@ | ||
return (0, _effects.put)({ | ||
type: _connect.CONNECT_FULFILLING, | ||
meta: meta, | ||
payload: { | ||
directLine: directLine | ||
} | ||
}); | ||
case 12: | ||
_context2.next = 14; | ||
return (0, _effects.put)({ | ||
type: _connect.CONNECT_FULFILLED, | ||
@@ -152,10 +167,10 @@ meta: meta, | ||
case 12: | ||
_context2.next = 18; | ||
case 14: | ||
_context2.next = 20; | ||
break; | ||
case 14: | ||
_context2.prev = 14; | ||
case 16: | ||
_context2.prev = 16; | ||
_context2.t0 = _context2["catch"](7); | ||
_context2.next = 18; | ||
_context2.next = 20; | ||
return (0, _effects.put)({ | ||
@@ -168,14 +183,14 @@ type: _connect.CONNECT_REJECTED, | ||
case 18: | ||
_context2.prev = 18; | ||
_context2.next = 21; | ||
case 20: | ||
_context2.prev = 20; | ||
_context2.next = 23; | ||
return (0, _effects.cancelled)(); | ||
case 21: | ||
case 23: | ||
if (!_context2.sent) { | ||
_context2.next = 24; | ||
_context2.next = 26; | ||
break; | ||
} | ||
_context2.next = 24; | ||
_context2.next = 26; | ||
return (0, _effects.put)({ | ||
@@ -188,11 +203,11 @@ type: _connect.CONNECT_REJECTED, | ||
case 24: | ||
return _context2.finish(18); | ||
case 26: | ||
return _context2.finish(20); | ||
case 25: | ||
_context2.next = 27; | ||
case 27: | ||
_context2.next = 29; | ||
return (0, _forever.default)(); | ||
case 27: | ||
_context2.prev = 27; | ||
case 29: | ||
_context2.prev = 29; | ||
// TODO: [P2] DirectLineJS should kill the connection when we unsubscribe | ||
@@ -204,5 +219,5 @@ // But currently in v3, DirectLineJS does not have this functionality | ||
connectionStatusSubscription.unsubscribe(); | ||
return _context2.finish(27); | ||
return _context2.finish(29); | ||
case 32: | ||
case 34: | ||
case "end": | ||
@@ -212,3 +227,3 @@ return _context2.stop(); | ||
} | ||
}, _marked2, this, [[6,, 27, 32], [7, 14, 18, 25]]); | ||
}, _marked2, this, [[6,, 29, 34], [7, 16, 20, 27]]); | ||
} | ||
@@ -293,2 +308,2 @@ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9jb25uZWN0U2FnYS5qcyJdLCJuYW1lcyI6WyJjb25uZWN0U2FnYSIsImRpc2Nvbm5lY3RTYWdhIiwiT05MSU5FIiwiRU5ERUQiLCJERUZBVUxUX1VTRVJfSUQiLCJDT05ORUNU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I6IHRydWUsIHBheWxvYWQ6IG5ldyBFcnJvcignY2FuY2VsbGVkJykgfSk7XG4gICAgfVxuXG4gICAgdW5zdWJzY3JpYmUoKTtcbiAgfVxufVxuIl19 |
@@ -29,3 +29,3 @@ "use strict"; | ||
_context.next = 2; | ||
return (0, _effects.take)(_connect.CONNECT_FULFILLED); | ||
return (0, _effects.take)(_connect.CONNECT_FULFILLING); | ||
@@ -60,2 +60,2 @@ case 2: | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zYWdhcy9lZmZlY3RzL3doaWxlQ29ubmVjdGVkLmpzIl0sIm5hbWVzIjpbImZuIiwiQ09OTkVDVF9GVUxGSUxMRUQiLCJ1c2VySUQiLCJtZXRhIiwiZGlyZWN0TGluZSIsInBheWxvYWQiLCJ0YXNrIiwiRElTQ09OTkVDVF9GVUxGSUxMRUQiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUE7O0FBT0E7O0FBQ0E7O0FBRWUsa0JBQVVBLEVBQVYsRUFBYztBQUMzQixTQUFPO0FBQUE7QUFBQSw0QkFBSztBQUFBOztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFFOEMsbUJBQU0sbUJBQUtDLDBCQUFMLENBQU47O0FBRjlDO0FBQUE7QUFFUUMsWUFBQUEsTUFGUixRQUVBQyxJQUZBLENBRVFELE1BRlI7QUFFNkJFLFlBQUFBLFVBRjdCLFFBRWtCQyxPQUZsQixDQUU2QkQsVUFGN0I7QUFBQTtBQUdLLG1CQUFNLG1CQUFLSixFQUFMLEVBQVNJLFVBQVQsRUFBcUJGLE1BQXJCLENBQU47O0FBSEw7QUFHRkksWUFBQUEsSUFIRTtBQUFBO0FBS1IsbUJBQU0sbUJBQUtDLGdDQUFMLENBQU47O0FBTFE7QUFBQTtBQU1SLG1CQUFNLHFCQUFPRCxJQUFQLENBQU47O0FBTlE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sgdXNlcklEIH0sIHBheWxvYWQ6IHsgZGlyZWN0TGluZSB9IH0gPSB5aWVsZCB0YWtlKENPTk5FQ1RfRlVMRklMTElORyk7XG4gICAgICBjb25zdCB0YXNrID0geWllbGQgZm9yayhmbiwgZGlyZWN0TGluZSwgdXNlcklEKTtcblxuICAgICAgeWllbGQgdGFrZShESVNDT05ORUNUX0ZVTEZJTExFRCk7XG4gICAgICB5aWVsZCBjYW5jZWwodGFzayk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== |
@@ -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,22 +27,29 @@ | ||
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(directLine, userID) { | ||
return _regenerator.default.wrap(function observeActivity$(_context3) { | ||
while (1) { | ||
@@ -46,5 +59,7 @@ switch (_context3.prev = _context3.next) { | ||
_context3.next = 2; | ||
return (0, _whileConnected.default)( | ||
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) { | ||
@@ -54,65 +69,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": | ||
@@ -130,4 +106,32 @@ return _context2.stop(); | ||
} | ||
}, _marked, this); | ||
}, _marked2, this); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9pbmNvbWluZ0FjdGl2aXR5U2FnYS5qcyJdLCJuYW1lcyI6WyJsYXN0IiwiYXJyYXkiLCJwcmVkaWNhdGUiLCJpIiwibGVuZ3RoIiwiaXRlbSIsImNhbGwiLCJkaXJlY3RMaW5lIiwidXNlcklEIiwiYWN0aXZpdHkkIiwiYWN0aXZpdHkiLCJmcm9tIiwicm9sZSIsImlkIiwiYWN0aXZpdGllcyIsImxhc3RNZXN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lwZSA9PT0gJ21lc3NhZ2UnKTtcblxuICAgICAgaWYgKFxuICAgICAgICBsYXN0TWVzc2FnZUFjdGl2aXR5XG4gICAgICAgICYmIGxhc3RNZXNzYWdlQWN0aXZpdHkuZnJvbVxuICAgICAgICAmJiBsYXN0TWVzc2FnZUFjdGl2aXR5LmZyb20ucm9sZSA9PT0gJ2JvdCdcbiAgICAgICkge1xuICAgICAgICBjb25zdCB7IHN1Z2dlc3RlZEFjdGlvbnM6IHsgYWN0aW9ucyB9ID0ge30gfSA9IGxhc3RNZXNzYWdlQWN0aXZpdHk7XG5cbiAgICAgICAgeWllbGQgcHV0KHNldFN1Z2dlc3RlZEFjdGlvbnMoYWN0aW9ucykpO1xuICAgICAgfVxuICAgIH0pO1xuICB9KTtcbn1cbiJdfQ== | ||
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, ['from', 'role'], function () { | ||
return 'channel'; | ||
}); | ||
} | ||
} | ||
return activity; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9pbmNvbWluZ0FjdGl2aXR5U2FnYS5qcyJdLCJuYW1lcyI6WyJvYnNlcnZlQWN0aXZpdHk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lY3QgTGluZSBzcGVjLCBpdCB3YXMgbm90IHNlbnQgb3ZlciB0aGUgd2lyZS5cbiAgLy8gV2Ugbm9ybWFsaXplIHRoZSBhY3Rpdml0eSBoZXJlIHRvIHNpbXBsaWZ5IG51bGwtY2hlY2sgYW5kIGxvZ2ljIGxhdGVyLlxuXG4gIC8vIFBhdGNoIGFjdGl2aXR5LmZyb20ucm9sZSB0byBtYWtlIHN1cmUgaXRzIGVpdGhlciBcImJvdFwiLCBcInVzZXJcIiwgb3IgXCJjaGFubmVsXCJcbiAgaWYgKCFhY3Rpdml0eS5mcm9tKSB7XG4gICAgYWN0aXZpdHkgPSB1cGRhdGVJbihhY3Rpdml0eSwgWydmcm9tJywgJ3JvbGUnXSwgKCkgPT4gJ2NoYW5uZWwnKTtcbiAgfSBlbHNlIGlmICghYWN0aXZpdHkuZnJvbS5yb2xlKSB7XG4gICAgaWYgKGFjdGl2aXR5LmZyb20uaWQgPT09IHVzZXJJRCkge1xuICAgICAgYWN0aXZpdHkgPSB1cGRhdGVJbihhY3Rpdml0eSwgWydmcm9tJywgJ3JvbGUnXSwgKCkgPT4gJ3VzZXInKTtcbiAgICB9IGVsc2UgaWYgKGFjdGl2aXR5LmZyb20uaWQpIHtcbiAgICAgIGFjdGl2aXR5ID0gdXBkYXRlSW4oYWN0aXZpdHksIFsnZnJvbScsICdyb2xlJ10sICgpID0+ICdib3QnKTtcbiAgICB9IGVsc2Uge1xuICAgICAgYWN0aXZpdHkgPSB1cGRhdGVJbihhY3Rpdml0eSwgWydmcm9tJywgJ3JvbGUnXSwgKCkgPT4gJ2NoYW5uZWwnKTtcbiAgICB9XG4gIH1cblxuICByZXR1cm4gYWN0aXZpdHk7XG59XG4iXX0= |
@@ -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,41 @@ /*#__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(directLine, userID) { | ||
var numActivitiesPosted; | ||
return _regenerator.default.wrap(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
numActivitiesPosted = 0; | ||
_context2.next = 3; | ||
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, 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 "end": | ||
return _context.stop(); | ||
return _context2.stop(); | ||
} | ||
} | ||
}, _callee, this); | ||
}, _callee2, this); | ||
})); | ||
@@ -87,3 +94,3 @@ | ||
case "end": | ||
return _context2.stop(); | ||
return _context3.stop(); | ||
} | ||
@@ -95,17 +102,14 @@ } | ||
function postActivity(directLine, userID, numActivitiesPosted, _ref) { | ||
var activity, locale, _activity, attachments, _activity$channelData, _activity$channelData2, clientActivityID, meta, echoBackCall, sendTimeout, _ref6, echoBack; | ||
var method, activity, locale, _activity, attachments, _activity$channelData, _activity$channelData2, clientActivityID, meta, echoBackCall, sendTimeout, _ref4, 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 = _ref.meta.method, activity = _ref.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; | ||
@@ -115,6 +119,6 @@ _activity$channelData = _activity$channelData === void 0 ? {} : _activity$channelData; | ||
activity = (0, _objectSpread2.default)({}, (0, _deleteKey.default)(activity, 'id'), { | ||
attachments: attachments && attachments.map(function (_ref3) { | ||
var contentType = _ref3.contentType, | ||
contentUrl = _ref3.contentUrl, | ||
name = _ref3.name; | ||
attachments: attachments && attachments.map(function (_ref2) { | ||
var contentType = _ref2.contentType, | ||
contentUrl = _ref2.contentUrl, | ||
name = _ref2.name; | ||
return { | ||
@@ -150,15 +154,16 @@ contentType: contentType, | ||
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,26 +173,26 @@ // So, we setup expectation first, then postActivity afterward | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee3() { | ||
var _ref4, _activity2, _activity2$channelDat, channelData, id; | ||
_regenerator.default.mark(function _callee4() { | ||
var _ref3, _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; | ||
_activity2 = _ref4.payload.activity; | ||
_ref3 = _context4.sent; | ||
_activity2 = _ref3.payload.activity; | ||
_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; | ||
@@ -197,6 +202,6 @@ | ||
case "end": | ||
return _context3.stop(); | ||
return _context4.stop(); | ||
} | ||
} | ||
}, _callee3, this); | ||
}, _callee4, this); | ||
})); // Timeout could be due to either: | ||
@@ -207,11 +212,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)({ | ||
@@ -230,5 +232,5 @@ send: (0, _effects.all)({ | ||
case 19: | ||
_ref6 = _context4.sent; | ||
echoBack = _ref6.send.echoBack; | ||
_context4.next = 23; | ||
_ref4 = _context5.sent; | ||
echoBack = _ref4.send.echoBack; | ||
_context5.next = 23; | ||
return (0, _effects.put)({ | ||
@@ -243,9 +245,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)({ | ||
@@ -255,17 +257,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)({ | ||
@@ -279,7 +281,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(); | ||
} | ||
@@ -289,2 +291,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9wb3N0QWN0aXZpdHlTYWdhLmpzIl0sIm5hbWVzIjpbInBvc3RBY3Rpdml0eSIsImRpcmVjdExpbmUiLCJ1c2VySUQiLCJudW1BY3Rpdml0aWVzUG9zdGVkIiwiUE9TVF9BQ1RJVklUWSIsImFjdGlvbiIsImFjdGl2aXR5IiwicGF5bG9hZCIsImxhbmd1YWdlIiwibG9jYWxlIiwiYXR0YWNobWVudHMiLCJjaGFubmVsRGF0YSIsImNsaWVudEFjdGl2aXR5SUQiLCJtYXAiLCJjb250ZW50VHlwZSIsImNvbnRlbnRVcmwiLCJuYW1lIiwiY2hhbm5lbElkIiwiZnJvbSIsImlkIiwicm9sZSIsInRpbWVzdGFtcCIsImVudGl0aWVzIiwicmVxdWlyZXNCb3RTdGF0ZSIsInN1cHBvcnRzTGlzdGVuaW5nIiwic3VwcG9ydHNUdHMiLCJ0eXBlIiwibWV0YSIsIlBPU1RfQUNUSVZJVFlfUEVORElORyIsImVjaG9CYWNrQ2FsbCIsIklOQ09NSU5HX0FDVElWSVRZIiwic2VuZFRpbWVvdXQiLCJzZW5kIiwiZWNob0JhY2siLCJ0aW1lb3V0IiwidGhlbiIsIlByb21pc2UiLCJyZWplY3QiLCJFcnJvciIsIlBPU1RfQUNUSVZJVFlfRlVMRklMTEVEIiwiUE9TVF9BQ1RJVklUWV9SRUpFQ1RFRCIsImVycm9yIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFXQTs7QUFFQTs7QUFDQTs7QUFFQTs7QUFDQTs7QUFDQTs7QUFFQTs7QUFPQTs7Ozs7OzswQk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AgICBjb25zdCBzZW5kVGltZW91dCA9IHlpZWxkIHNlbGVjdChzZW5kVGltZW91dFNlbGVjdG9yKTtcblxuICAgIGNvbnN0IHsgc2VuZDogeyBlY2hvQmFjayB9IH0gPSB5aWVsZCByYWNlKHtcbiAgICAgIHNlbmQ6IGFsbCh7XG4gICAgICAgIGVjaG9CYWNrOiBlY2hvQmFja0NhbGwsXG4gICAgICAgIHBvc3RBY3Rpdml0eTogb2JzZXJ2ZU9uY2UoZGlyZWN0TGluZS5wb3N0QWN0aXZpdHkoYWN0aXZpdHkpKVxuICAgICAgfSksXG4gICAgICB0aW1lb3V0OiBjYWxsKCgpID0+IHNsZWVwKHNlbmRUaW1lb3V0KS50aGVuKCgpID0+IFByb21pc2UucmVqZWN0KG5ldyBFcnJvcigndGltZW91dCcpKSkpXG4gICAgfSk7XG5cbiAgICB5aWVsZCBwdXQoeyB0eXBlOiBQT1NUX0FDVElWSVRZX0ZVTEZJTExFRCwgbWV0YSwgcGF5bG9hZDogeyBhY3Rpdml0eTogZWNob0JhY2sgfSB9KTtcbiAgfSBjYXRjaCAoZXJyKSB7XG4gICAgeWllbGQgcHV0KHsgdHlwZTogUE9TVF9BQ1RJVklUWV9SRUpFQ1RFRCwgZXJyb3I6IHRydWUsIG1ldGEsIHBheWxvYWQ6IGVyciB9KTtcbiAgfSBmaW5hbGx5IHtcbiAgICBpZiAoeWllbGQgY2FuY2VsbGVkKCkpIHtcbiAgICAgIHlpZWxkIHB1dCh7IHR5cGU6IFBPU1RfQUNUSVZJVFlfUkVKRUNURUQsIGVycm9yOiB0cnVlLCBtZXRhLCBwYXlsb2FkOiBuZXcgRXJyb3IoJ2NhbmNlbGxlZCcpIH0pO1xuICAgIH1cbiAgfVxufVxuIl19 |
@@ -8,3 +8,3 @@ "use strict"; | ||
}); | ||
exports.default = _callee2; | ||
exports.default = _callee; | ||
@@ -23,77 +23,84 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
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); | ||
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); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9zZW5kRmlsZXNUb1Bvc3RBY3Rpdml0eVNhZ2EuanMiXSwibmFtZXMiOlsiZ2V0VHlwZSIsIm1pbWUiLCJiaW5kIiwiU0VORF9GSUxFUyIsImZpbGVzIiwicGF5bG9hZCIsImxlbmd0aCIsImF0dGFjaG1lbnRzIiwibWFwIiwiY2FsbCIsImZpbGUiLCJjb250ZW50VHlwZSIsIm5hbWUiLCJjb250ZW50VXJsIiwidXJsIiwiY2hhbm5lbERhdGEiLCJhdHRhY2htZ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VTXG4gICAgICAmJiBwYXlsb2FkLmZpbGVzLmxlbmd0aFxuICAgICksXG4gICAgcG9zdEFjdGl2aXR5V2l0aEZpbGVzXG4gICk7XG59XG5cbmZ1bmN0aW9uKiBwb3N0QWN0aXZpdHlXaXRoRmlsZXMoeyBwYXlsb2FkOiB7IGZpbGVzIH0gfSkge1xuICB5aWVsZCBwdXQocG9zdEFjdGl2aXR5KHtcbiAgICBhdHRhY2htZW50czogW10ubWFwLmNhbGwoZmlsZXMsICh7IG5hbWUsIHVybCB9KSA9PiAoe1xuICAgICAgY29udGVudFR5cGU6IGdldFR5cGUobmFtZSkgfHwgJ2FwcGxpY2F0aW9uL29jdGV0LXN0cmVhbScsXG4gICAgICBjb250ZW50VXJsOiB1cmwsXG4gICAgICBuYW1lOiBuYW1lXG4gICAgfSkpLFxuICAgIGNoYW5uZWxEYXRhOiB7XG4gICAgICBhdHRhY2htZW50U2l6ZXM6IFtdLm1hcC5jYWxsKGZpbGVzLCAoeyBzaXplIH0pID0+IHNpemUpXG4gICAgfSxcbiAgICB0eXBlOiAnbWVzc2FnZSdcbiAgfSkpO1xufVxuIl19 |
@@ -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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9zZW5kTWVzc2FnZVRvUG9zdEFjdGl2aXR5U2FnYS5qcyJdLCJuYW1lcyI6WyJTRU5EX01FU1NBR0UiLCJwYXlsb2FkIiwidGV4dCIsInZpYSIsInRleHRGb3JtYXQiLCJ0eXBlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBOztBQUtBOztBQUVBOztBQUNBOztBQUNBOztBQUNBOzs7Ozs7QUFFZTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDYixpQkFBTTtBQUFBO0FBQUEsb0NBQWU7QUFBQTs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBRWtCLDJCQUFNLG1CQUFLQSx5QkFBTCxDQUFOOztBQUZsQjtBQUFBO0FBQUEsd0NBRVRDLE9BRlM7QUFFRUMsb0JBQUFBLElBRkYsZ0JBRUVBLElBRkY7QUFFUUMsb0JBQUFBLEdBRlIsZ0JBRVFBLEdBRlI7O0FBQUEseUJBSWJELElBSmE7QUFBQTtBQUFBO0FBQUE7O0FBQUE7QUFLZiwyQkFBTSxrQkFBSSwyQkFBYTtBQUNyQkEsc0JBQUFBLElBQUksRUFBSkEsSUFEcUI7QUFFckJFLHNCQUFBQSxVQ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oc2VuZE1lc3NhZ2VUb1Bvc3RBY3Rpdml0eSk7XG59XG5cbmZ1bmN0aW9uKiBzZW5kTWVzc2FnZVRvUG9zdEFjdGl2aXR5KCkge1xuICB5aWVsZCB0YWtlRXZlcnkoKHsgcGF5bG9hZCwgdHlwZSB9KSA9PiAoXG4gICAgdHlwZSA9PT0gU0VORF9NRVNTQUdFXG4gICAgJiYgcGF5bG9hZC50ZXh0XG4gICksIHBvc3RBY3Rpdml0eVdpdGhNZXNzYWdlKTtcbn1cblxuZnVuY3Rpb24qIHBvc3RBY3Rpdml0eVdpdGhNZXNzYWdlKHsgcGF5bG9hZDogeyBtZXRob2QsIHRleHQgfSB9KSB7XG4gIHlpZWxkIHB1dChwb3N0QWN0aXZpdHkoe1xuICAgIHRleHQsXG4gICAgdGV4dEZvcm1hdDogJ3BsYWluJyxcbiAgICB0eXBlOiAnbWVzc2FnZSdcbiAgfSwgbWV0aG9kKSk7XG59XG4iXX0= |
@@ -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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9zZW5kUG9zdEJhY2tUb1Bvc3RBY3Rpdml0eVNhZ2EuanMiXSwibmFtZXMiOlsiU0VORF9QT1NUX0JBQ0siLCJ2YWx1ZSIsInBheWxvYWQiLCJjaGFubmVsRGF0YSIsInBvc3RCYWNrIiwidGV4dCIsInVuZGVmaW5lZCIsInR5cGUiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUE7O0FBS0E7O0FBRUE7O0FBQ0E7Ozs7OztBQUVlO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNiLGlCQUFNO0FBQUE7QUFBQSxvQ0FBZTtBQUFBOztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFFYywyQkFBTSxtQkFBS0EsNEJBQUwsQ0FBTjs7QUFGZDtBQUFBO0FBRUVDLG9CQUFBQSxLQUZGLFFBRVRDLE9BRlMsQ0FFRUQsS0FGRjs7QUFBQSx5QkFJYkEsS0FKYTtBQUFBO0FBQUE7QUFBQTs7QUFBQTtBQUtmLDJCQUFNLGtCQUFJLDJCQUFhO0FBQ3JCRSxzQkFBQUEsV0FBVyxFQUFFO0FBQ1hDLHdCQUFBQSxRQUFRLEVBQUU7QUFEQyx1QkFEUTtBQUlyQkMsc0JBQUFBLElBQUksRUFBRSxPQUFPSixLQUFQLEtBQWlCLFFBQWpCLEdBQTRCQSxLQUE1QixHQUFvQ0ssU0FKckI7QUFLckJDLHNCQUFBQSxJQUFJLEVBQUUsU0FMZTtBQU1yQk4sc0JBQUFBLEtBQUssRUFBRSxPQUFPQSxLQUFQLEtBQWlCLFFBQWpCLEdBQTRCQSxLQUE1QixHQUFv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9hZC52YWx1ZVxuICAgICksXG4gICAgcG9zdEFjdGl2aXR5V2l0aFBvc3RCYWNrXG4gICk7XG59XG5cbmZ1bmN0aW9uKiBwb3N0QWN0aXZpdHlXaXRoUG9zdEJhY2soeyBwYXlsb2FkOiB7IHZhbHVlIH0gfSkge1xuICB5aWVsZCBwdXQocG9zdEFjdGl2aXR5KHtcbiAgICBjaGFubmVsRGF0YToge1xuICAgICAgcG9zdEJhY2s6IHRydWVcbiAgICB9LFxuICAgIHRleHQ6IHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycgPyB2YWx1ZSA6IHVuZGVmaW5lZCxcbiAgICB0eXBlOiAnbWVzc2FnZScsXG4gICAgdmFsdWU6IHR5cGVvZiB2YWx1ZSAhPT0gJ3N0cmluZycgPyB2YWx1ZSA6IHVuZGVmaW5lZFxuICB9KSk7XG59XG4iXX0= |
"use strict"; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
@@ -8,3 +10,3 @@ | ||
}); | ||
exports.default = _callee3; | ||
exports.default = _callee; | ||
@@ -15,4 +17,2 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _whileConnected = _interopRequireDefault(require("./effects/whileConnected")); | ||
var _setSendBox = require("../actions/setSendBox"); | ||
@@ -22,4 +22,8 @@ | ||
var _postActivity = _interopRequireDefault(require("../actions/postActivity")); | ||
var _postActivity = _interopRequireWildcard(require("../actions/postActivity")); | ||
var _whileConnected = _interopRequireDefault(require("./effects/whileConnected")); | ||
var _sendTyping = _interopRequireDefault(require("../selectors/sendTyping")); | ||
var _sleep = _interopRequireDefault(require("../utils/sleep")); | ||
@@ -29,3 +33,6 @@ | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(_callee3); | ||
_regenerator.default.mark(_callee), | ||
_marked2 = | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(sendTypingOnSetSendBox); | ||
@@ -42,101 +49,93 @@ var SEND_INTERVAL = 3000; | ||
function _callee3() { | ||
return _regenerator.default.wrap(function _callee3$(_context4) { | ||
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)(sendTypingOnSetSendBox); | ||
case 2: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _marked, this); | ||
} | ||
function sendTypingOnSetSendBox() { | ||
var sendTyping, _loop; | ||
return _regenerator.default.wrap(function sendTypingOnSetSendBox$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
_context4.next = 2; | ||
return (0, _whileConnected.default)( | ||
return (0, _effects.select)(_sendTyping.default); | ||
case 2: | ||
sendTyping = _context4.sent; | ||
if (sendTyping) { | ||
_context4.next = 6; | ||
break; | ||
} | ||
_context4.next = 6; | ||
return takeSendTyping(true); | ||
case 6: | ||
_loop = | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee2() { | ||
var sendTyping, _loop; | ||
return _regenerator.default.wrap(function _callee2$(_context3) { | ||
_regenerator.default.mark(function _loop() { | ||
var lastSend, task; | ||
return _regenerator.default.wrap(function _loop$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
_context3.next = 2; | ||
return (0, _effects.select)(function (_ref2) { | ||
var sendTyping = _ref2.sendTyping; | ||
return sendTyping; | ||
}); | ||
case 2: | ||
sendTyping = _context3.sent; | ||
if (sendTyping) { | ||
_context3.next = 6; | ||
break; | ||
} | ||
_context3.next = 6; | ||
return takeSendTyping(true); | ||
case 6: | ||
_loop = | ||
lastSend = 0; | ||
_context3.next = 3; | ||
return (0, _effects.takeLatest)(function (_ref2) { | ||
var payload = _ref2.payload, | ||
type = _ref2.type; | ||
return type === _setSendBox.SET_SEND_BOX && payload.text || // Stop sending pending typing indicator if the user has posted anything. | ||
// We send typing indicator in a debounce way (t = 0, t = 3000, t = 6000). | ||
// When the user type, and then post the activity at t = 1500, we still have a pending typing indicator at t = 3000. | ||
// This code is to cancel the typing indicator at t = 3000. | ||
type === _postActivity.POST_ACTIVITY && payload.activity.type !== 'typing'; | ||
}, | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _loop() { | ||
var lastSend, task; | ||
return _regenerator.default.wrap(function _loop$(_context2) { | ||
_regenerator.default.mark(function _callee2(_ref3) { | ||
var type, interval; | ||
return _regenerator.default.wrap(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
lastSend = 0; | ||
_context2.next = 3; | ||
return (0, _effects.takeLatest)(_setSendBox.SET_SEND_BOX, | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee(_ref3) { | ||
var text, interval; | ||
return _regenerator.default.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
text = _ref3.payload.text; | ||
type = _ref3.type; | ||
if (!text) { | ||
_context.next = 9; | ||
break; | ||
} | ||
if (!(type === _setSendBox.SET_SEND_BOX)) { | ||
_context2.next = 9; | ||
break; | ||
} | ||
interval = SEND_INTERVAL - Date.now() + lastSend; | ||
interval = SEND_INTERVAL - Date.now() + lastSend; | ||
if (!(interval > 0)) { | ||
_context.next = 6; | ||
break; | ||
} | ||
if (!(interval > 0)) { | ||
_context2.next = 6; | ||
break; | ||
} | ||
_context.next = 6; | ||
return (0, _effects.call)(_sleep.default, interval); | ||
case 6: | ||
_context.next = 8; | ||
return (0, _effects.put)((0, _postActivity.default)({ | ||
type: 'typing' | ||
})); | ||
case 8: | ||
lastSend = Date.now(); | ||
case 9: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee, this); | ||
})); | ||
case 3: | ||
task = _context2.sent; | ||
_context2.next = 6; | ||
return takeSendTyping(false); | ||
return (0, _effects.call)(_sleep.default, interval); | ||
case 6: | ||
_context2.next = 8; | ||
return (0, _effects.cancel)(task); | ||
return (0, _effects.put)((0, _postActivity.default)({ | ||
type: 'typing' | ||
})); | ||
case 8: | ||
_context2.next = 10; | ||
return takeSendTyping(true); | ||
lastSend = Date.now(); | ||
case 10: | ||
case 9: | ||
case "end": | ||
@@ -146,11 +145,17 @@ return _context2.stop(); | ||
} | ||
}, _loop, this); | ||
}); | ||
}, _callee2, this); | ||
})); | ||
case 7: | ||
return _context3.delegateYield(_loop(), "t0", 8); | ||
case 3: | ||
task = _context3.sent; | ||
_context3.next = 6; | ||
return takeSendTyping(false); | ||
case 6: | ||
_context3.next = 8; | ||
return (0, _effects.cancel)(task); | ||
case 8: | ||
_context3.next = 7; | ||
break; | ||
_context3.next = 10; | ||
return takeSendTyping(true); | ||
@@ -162,6 +167,13 @@ case 10: | ||
} | ||
}, _callee2, this); | ||
})); | ||
}, _loop, this); | ||
}); | ||
case 2: | ||
case 7: | ||
return _context4.delegateYield(_loop(), "t0", 8); | ||
case 8: | ||
_context4.next = 7; | ||
break; | ||
case 10: | ||
case "end": | ||
@@ -171,4 +183,4 @@ return _context4.stop(); | ||
} | ||
}, _marked, this); | ||
}, _marked2, this); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9zZW5kVHlwaW5nT25TZXRTZW5kQm94U2FnYS5qcyJdLCJuYW1lcyI6WyJTRU5EX0lOVEVSVkFMIiwidGFrZVNlbmRUeXBpbmciLCJ2YWx1ZSIsInBheWxvYWQiLCJ0eXBlIiwiU0VUX1NFTkRfVFlQSU5HIiwic2VuZFR5cGluZyIsImxhc3RTZW5kIiwiU0VUX1NFTkRfQk9YIiwidGV4dCIsImludGVydmFsIiwiRGF0ZSIsIm5vdyIsInNsZWVwIiwidGFzayJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQTs7QUFTQTs7QUFFQTs7QUFDQTs7QUFDQTs7QUFDQTs7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pdml0eSh7IHR5cGU6ICd0eXBpbmcnIH0pKTtcblxuICAgICAgICAgIGxhc3RTZW5kID0gRGF0ZS5ub3coKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICk7XG5cbiAgICB5aWVsZCB0YWtlU2VuZFR5cGluZyhmYWxzZSk7XG4gICAgeWllbGQgY2FuY2VsKHRhc2spO1xuICAgIHlpZWxkIHRha2VTZW5kVHlwaW5nKHRydWUpO1xuICB9XG59XG4iXX0= |
@@ -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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9zdGFydERpY3RhdGVBZnRlclNwZWFrQWN0aXZpdHlTYWdhLmpzIl0sIm5hbWVzIjpbInN0YXJ0RGljdGF0ZUFmdG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ydERpY3RhdGUoKSk7XG4gIH1cbn1cbiJdfQ== |
@@ -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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9zdWJtaXRTZW5kQm94U2FnYS5qcyJdLCJuYW1lcyI6WyJTVUJNSVRfU0VORF9CT1giLCJ2aWEiLCJwYXlsb2FkIiwic2VuZEJveFZhbHVlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBOztBQU1BOztBQUVBOztBQUNBOztBQUNBOzs7Ozs7QUFFZTtBQUFBO0FBQUE7QUF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VmFsdWUnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiogKCkge1xuICB5aWVsZCB3aGlsZUNvbm5lY3RlZChzdWJtaXRTZW5kQm94KTtcbn1cblxuZnVuY3Rpb24qIHN1Ym1pdFNlbmRCb3goKSB7XG4gIHlpZWxkIHRha2VFdmVyeShTVUJNSVRfU0VORF9CT1gsIGZ1bmN0aW9uKiAoeyBwYXlsb2FkOiB7IG1ldGhvZCB9IH0pIHtcbiAgICBjb25zdCBzZW5kQm94VmFsdWUgPSB5aWVsZCBzZWxlY3Qoc2VuZEJveFZhbHVlU2VsZWN0b3IpO1xuXG4gICAgaWYgKHNlbmRCb3hWYWx1ZSkge1xuICAgICAgeWllbGQgcHV0KHNlbmRNZXNzYWdlKHNlbmRCb3hWYWx1ZSwgbWV0aG9kKSk7XG4gICAgICB5aWVsZCBwdXQoc2V0U2VuZEJveCgnJykpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0= |
{ | ||
"name": "botframework-webchat-core", | ||
"version": "4.2.1-master.164a155", | ||
"version": "4.2.1-master.1a80c5e", | ||
"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.10.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_PENDING = `${ CONNECT }_PENDING`; | ||
const CONNECT_REJECTED = `${ CONNECT }_REJECTED`; | ||
const CONNECT_FULFILLING = `${ CONNECT }_FULFILLING`; | ||
const CONNECT_FULFILLED = `${ CONNECT }_FULFILLED`; | ||
@@ -17,3 +18,4 @@ | ||
CONNECT_REJECTED, | ||
CONNECT_FULFILLING, | ||
CONNECT_FULFILLED | ||
} |
@@ -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 @@ } |
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'; | ||
@@ -35,4 +37,6 @@ import setDictateInterims from './actions/setDictateInterims'; | ||
postActivity, | ||
sendEvent, | ||
sendFiles, | ||
sendMessage, | ||
sendMessageBack, | ||
sendPostBack, | ||
@@ -39,0 +43,0 @@ setDictateInterims, |
@@ -11,2 +11,3 @@ import { combineReducers } from 'redux'; | ||
import sendTimeout from './reducers/sendTimeout'; | ||
import sendTyping from './reducers/sendTyping'; | ||
import suggestedActions from './reducers/suggestedActions'; | ||
@@ -23,3 +24,4 @@ | ||
sendTimeout, | ||
sendTyping, | ||
suggestedActions | ||
}) |
@@ -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 }) => |
@@ -7,12 +7,17 @@ import { fork } from 'redux-saga/effects'; | ||
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 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'; | ||
@@ -25,13 +30,18 @@ | ||
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(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,2 +11,3 @@ import { | ||
import { decode } from 'jsonwebtoken'; | ||
import random from 'math-random'; | ||
@@ -22,2 +23,3 @@ import callUntil from './effects/callUntil'; | ||
CONNECT_REJECTED, | ||
CONNECT_FULFILLING, | ||
CONNECT_FULFILLED | ||
@@ -40,3 +42,5 @@ } from '../actions/connect'; | ||
const DEFAULT_USER_ID = 'default-user'; | ||
function randomUserID() { | ||
return `r_${ random().toString(36).substr(2, 10) }`; | ||
} | ||
@@ -58,10 +62,10 @@ export default function* () { | ||
console.warn('Web Chat: user ID must be a string.'); | ||
userID = DEFAULT_USER_ID; | ||
userID = randomUserID(); | ||
} 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; | ||
userID = randomUserID(); | ||
} | ||
} else { | ||
// Only specify "default-user" if not found from token and not passed in | ||
userID = DEFAULT_USER_ID; | ||
userID = randomUserID(); | ||
} | ||
@@ -90,2 +94,3 @@ | ||
yield callUntil(connectionStatusQueue.shift, [], connectionStatus => connectionStatus === ONLINE); | ||
yield put({ type: CONNECT_FULFILLING, meta, payload: { directLine } }); | ||
yield put({ type: CONNECT_FULFILLED, meta, payload: { directLine } }); | ||
@@ -92,0 +97,0 @@ } catch (err) { |
@@ -8,3 +8,3 @@ import { | ||
import { CONNECT_FULFILLED } from '../../actions/connect'; | ||
import { CONNECT_FULFILLING } from '../../actions/connect'; | ||
import { DISCONNECT_FULFILLED } from '../../actions/disconnect'; | ||
@@ -15,3 +15,3 @@ | ||
for (;;) { | ||
const { meta: { userID }, payload: { directLine } } = yield take(CONNECT_FULFILLED); | ||
const { meta: { userID }, payload: { directLine } } = yield take(CONNECT_FULFILLING); | ||
const task = yield fork(fn, directLine, userID); | ||
@@ -18,0 +18,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'; | ||
@@ -33,12 +35,12 @@ | ||
yield whileConnected(function* (directLine, userID) { | ||
for (let numActivitiesPosted = 0;; numActivitiesPosted++) { | ||
const action = yield take(POST_ACTIVITY); | ||
let numActivitiesPosted = 0; | ||
yield fork(postActivity, directLine, userID, numActivitiesPosted, action); | ||
} | ||
yield takeEvery(POST_ACTIVITY, function* (action) { | ||
yield* postActivity(directLine, userID, numActivitiesPosted++, action); | ||
}); | ||
}); | ||
} | ||
function* postActivity(directLine, userID, numActivitiesPosted, { payload: { activity } }) { | ||
const locale = yield select(({ language }) => language); | ||
function* postActivity(directLine, userID, numActivitiesPosted, { meta: { method }, payload: { activity } }) { | ||
const locale = yield select(languageSelector); | ||
const { attachments, channelData: { clientActivityID = uniqueID() } = {} } = activity; | ||
@@ -77,5 +79,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 } }); | ||
@@ -102,3 +104,3 @@ try { | ||
const sendTimeout = yield select(({ sendTimeout }) => sendTimeout); | ||
const sendTimeout = yield select(sendTimeoutSelector); | ||
@@ -105,0 +107,0 @@ const { send: { echoBack } } = yield race({ |
import { | ||
put, | ||
take | ||
takeEvery | ||
} from 'redux-saga/effects'; | ||
@@ -12,3 +12,2 @@ | ||
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 | ||
})); | ||
} |
@@ -10,7 +10,10 @@ import { | ||
import { SET_SEND_BOX } from '../actions/setSendBox'; | ||
import { SET_SEND_TYPING } from '../actions/setSendTyping'; | ||
import postActivity, { POST_ACTIVITY } from '../actions/postActivity'; | ||
import whileConnected from './effects/whileConnected'; | ||
import { SET_SEND_BOX } from '../actions/setSendBox'; | ||
import { SET_SEND_TYPING } from '../actions/setSendTyping'; | ||
import postActivity from '../actions/postActivity'; | ||
import sendTypingSelector from '../selectors/sendTyping'; | ||
import sleep from '../utils/sleep'; | ||
@@ -25,13 +28,26 @@ | ||
export default function* () { | ||
yield whileConnected(function* () { | ||
const sendTyping = yield select(({ sendTyping }) => sendTyping); | ||
yield whileConnected(sendTypingOnSetSendBox); | ||
} | ||
if (!sendTyping) { | ||
yield takeSendTyping(true); | ||
} | ||
function* sendTypingOnSetSendBox() { | ||
const sendTyping = yield select(sendTypingSelector); | ||
for (;;) { | ||
let lastSend = 0; | ||
const task = yield takeLatest(SET_SEND_BOX, function* ({ payload: { text } }) { | ||
if (text) { | ||
if (!sendTyping) { | ||
yield takeSendTyping(true); | ||
} | ||
for (;;) { | ||
let lastSend = 0; | ||
const task = yield takeLatest( | ||
({ payload, type }) => ( | ||
(type === SET_SEND_BOX && payload.text) | ||
// Stop sending pending typing indicator if the user has posted anything. | ||
// We send typing indicator in a debounce way (t = 0, t = 3000, t = 6000). | ||
// When the user type, and then post the activity at t = 1500, we still have a pending typing indicator at t = 3000. | ||
// This code is to cancel the typing indicator at t = 3000. | ||
|| (type === POST_ACTIVITY && payload.activity.type !== 'typing') | ||
), | ||
function* ({ type }) { | ||
if (type === SET_SEND_BOX) { | ||
const interval = SEND_INTERVAL - Date.now() + lastSend; | ||
@@ -47,9 +63,9 @@ | ||
} | ||
}); | ||
} | ||
); | ||
yield takeSendTyping(false); | ||
yield cancel(task); | ||
yield takeSendTyping(true); | ||
} | ||
}); | ||
yield takeSendTyping(false); | ||
yield cancel(task); | ||
yield takeSendTyping(true); | ||
} | ||
} |
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('')); | ||
} | ||
}); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
330987
180
5101
8
+ Addedmath-random@^1.0.4
+ Addedmath-random@1.0.4(transitive)