ms teams chat bot events
1 TopicMS Teams Bot Event Not Fired when message is sent from outside the Teams Bot
Hello, I am sending a message on an existing conversation to my MS Teams Chat bot from outside i.e. a Windows Forms Application. ChannelAccount userAccount = originalActivity.From; ChannelAccount botAccount = new ChannelAccount("GenerateReport", "AzureFunction"); var message = new Activity();//Microsoft.Bot.Schema.Activity.CreateEventActivity(); message.Type = ActivityTypes.Message; message.From = originalActivity.Recipient; //new ChannelAccount("GenerateReport", "AzureFunction");//botAccount; message.Value = originalActivity; ((Activity)message).Text = "LongOperationResponse"; message.Recipient = originalActivity.From;// userAccount; message.ChannelId = originalActivity.ChannelId; message.Conversation = originalActivity.Conversation; ResourceResponse response21= await connectorClient.Conversations.SendToConversationAsync((Activity)message); The message activity is sent successfully and the message appears in the chat bot conversation. I would also like to somehow trap the event when the above message is received by the ma teams chat bot. I have attached the following Event handlers in DialogBot class that inherits form ActivityHandler class. - OnMessageActivityAsync - OnEventActivityAsync - OnTurnAsync However, none of the above events handlers get triggered when the message is send from outside the bot using the above logic. These event handlers get triggered only when user types a message in the chat bot. Which event should get triggered when an outside message is received by the teams chat bot and how do I handle the event. Please help. Thanks, Gagan3.1KViews0likes8Comments