Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Botbuilder SDK v4 creating 1:1 conversation from group

I'm attempting to send a 1:1 / private message to a specific user who tagged the bot in channel in Microsoft Teams. Because there isn't a botbuilder-teams that is compatible with botbuilder v4, I figured I'd have to implement this functionality myself. I know with proactive messages, you can use adapter.continueConversation which works correctly, but adapter.createConversation does not. Here is the relevant piece of code within one of my dialogs:

let reference = TurnContext.getConversationReference(cx.activity);

await adapter.createConversation(reference, async (context) => {
    await context.sendActivity("Hello World!");
});
like image 331
HarrisonG16 Avatar asked Jul 26 '18 17:07

HarrisonG16


1 Answers

The first parameter for CreateConversation Method should be the channel ID, which is in your case "teams". You don't have to supply the existing conversation reference as you are creating a new one.

like image 169
Anton Vidishchev Avatar answered Jan 02 '23 10:01

Anton Vidishchev