-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Microsoft Teams, <Conversation>.ReplyToActivity does not send a reply, it creates a new message to the conversation #6626
Comments
looks like this feature request? https://techcommunity.microsoft.com/t5/teams-developer/how-to-send-a-message-to-a-thread-reply-using-botbuilder-4-0-sdk/m-p/3716974 I think this bug / missing feature is very annoying, especially since we make heavy use of group chats. |
I think it's probably the same code, albeit a different usage scenario. In the other example, there was (I think) a 1-2-1 conversation between a user and a bot, where the OP wanted to perform a threaded reply. But also - I would argue that the presence in the SDK of a ReplyToActivityAsync method, which does not actually perform a reply, is a bug and not a missing feature! |
In hope this saves someone some time, we got replies working like this: |
Anxiously waiting to see something happen with this. |
thank you, it looks great. There my code,
|
Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.
Version
Microsoft.Bot.Builder 4.21.2 .NET SDK
Describe the bug
The ConnectorClient.Conversations object has a method, SendToConversation(Async), which is used to send new message threads into a conversation. (a conversation in this instance could be 1:1 conversation with a user, or a channel chat). The method accepts an activity object and a conversation ID, and returns an Activity ID of the newly created activity.
There is also a ReplyToActivityAsync method, which takes a single parameter, an Activity object. However, even when a message has a valid ReplyToID value, the reply is sent to Microsoft Teams as a new message, not a threaded reply.
There is also a ConversationExtension method ReplyToActivityAsync, which exhibits the same behaviour.
To Reproduce
IMessageActivity newMessage = Activity.CreateMessageActivity();
newMessage.Type = ActivityTypes.Message;
newMessage.Text = messageText;
newMessage.ReplyToId = {activity_id};
newMessage.Conversation = new ConversationAccount();
newMessage.Conversation.Id = {conversation_id};
var response = await connector.Conversations.ReplyToActivityAsync((Activity)message);
Expected behavior
The message should be sent as a threaded reply to the provided activity.
Tracking Status
Dotnet SDK TODO
Javascript SDK TODO
Python SDK TODO
Java SDK TODO
Samples TODO
Docs TODO
Tools TODO
The text was updated successfully, but these errors were encountered: