Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
sendActivity(activityOrText, speak, inputHint) {
let a;
if (typeof activityOrText === 'string') {
a = { text: activityOrText, inputHint: inputHint || botframework_schema_1.InputHints.AcceptingInput };
if (speak) {
a.speak = speak;
}
}
else {
a = activityOrText;
}
return this.sendActivities([a]).then((responses) => responses && responses.length > 0 ? responses[0] : undefined);
}
/**
function attachmentActivity(attachmentLayout, attachments, text, speak, inputHint) {
const msg = {
type: botframework_schema_1.ActivityTypes.Message,
attachmentLayout: attachmentLayout,
attachments: attachments,
inputHint: inputHint || botframework_schema_1.InputHints.AcceptingInput
};
if (text) {
msg.text = text;
}
if (speak) {
msg.speak = speak;
}
return msg;
}
//# sourceMappingURL=messageFactory.js.map