HarrisonG16
HarrisonG16

Reputation: 903

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!");
});

Upvotes: 8

Views: 402

Answers (1)

Anton Vidishchev
Anton Vidishchev

Reputation: 1399

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.

Upvotes: 1

Related Questions