You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
Once resolved, the WebAdapter typing feature can be used in a BotkitConversation like this:
let typing = new BotkitConversation('typing', controller);
typing.say('I am going to type for a while now...');
typing.addAction('typing');
// start the typing indicator
typing.addMessage({type: 'typing'}, 'typing');
// trigger a gotoThread, which gives us an opportunity to delay the next message
typing.addAction('next_thread','typing');
typing.addMessage('typed!','next_thread');
// use the before handler to delay the next message
typing.before('next_thread', async() => {
return new Promise((resolve, reject) => {
// simulate some long running process
setTimeout(resolve, 3000);
});
});
controller.addDialog(typing);
controller.hears('typing dialog', 'message', async(bot, message) => {
await bot.beginDialog('typing');
});
The BotkitConversation class has a few issues that prevent non-message type events from passing through.
First of all, messages without text or attachments are ignored. Need to fix this, at least, to also allow messages with a type set:
https://github.com/howdyai/botkit/blob/master/packages/botkit/src/conversation.ts#L657
Second, the makeOutgoing method does not currently copy forward the type field.
https://github.com/howdyai/botkit/blob/master/packages/botkit/src/conversation.ts#L787
The text was updated successfully, but these errors were encountered: