简体   繁体   中英

How to send a message to a thread (reply) using a Bot Framework SDK 4.18 Teams

Scenario:-

  1. User A -> Types a message in Teams App (bot)
  2. Now Bot has to reply to the same thread that user A has started in Teams App (bot)

I am able to send a new message in the Teams App (bot) - Not expected没有预期

The bot needs to reply to the same thread the user started - Expected预期的

Did not find any reply method in the below documentation.. continueConversation creates a new message.

https://learn.microsoft.com/en-us/javascript/api/botbuilder-core/turncontext?view=botbuilder-ts-latest#botbuilder-core-turncontext-getmentions&preserve-view=true

https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/conversation-basics

The bot cannot give the reply to the same thread that user started. This is by design behaviour.

Bot can reply to an existing message but it looks new message not like reply, call ReplyToActivity in .NET or session.send in Node.js. The Bot Builder SDK handles all the details.

If you choose to use the REST API, you can also call the /v3/conversations/{conversationId}/activities/{activityId} endpoint.

Ref Doc: https://learn.microsoft.com/en-us/microsoftteams/platform/resources/bot-v3/bot-conversations/bots-co.. .

If you wish you can suggest this feature on - Microsoft Teams · Community

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM