OfficeDev / Microsoft-Teams-Samples

Welcome to the Microsoft Teams samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Microsoft Teams App!
MIT License
947 stars 747 forks source link

Reply to a conversation thread in teams using Teams bot #1294

Open Ajaykumar661 opened 2 months ago

Ajaykumar661 commented 2 months ago

I have a bot that is created by using Microsoft botframework sdk, I'm trying to find a way to reply to a conversation thread in a teams Channel conversation without being prompted first by a user. So for example given a certain condition (eg. triggered by some event such as time of day, a pull request, etc.) it posts a message in a channel to a particular thread. I have read the documentation on the proactive messaging in teams. I gather that in order to send a message to a teams channel, the bot needs to know the "conversationId" of the user. This information is stored in the conversationreference object, and it gets this from the current conversation. However, in my case I don't have a 'current conservation', because I don't want to just respond to a user, I want to post a reply to a thread proactively. How can I achieve this ?

Also, I followed a document where the bot can read any messages without being mentioned using @ by following. So I thought we will be getting the user's conversation id in the context object whenever there is a new message in the channel RSC permissions, but it doesn't seems to be working out for me, I'm not sure if I'm missing out on anything

microsoft-github-policy-service[bot] commented 2 months ago

Hi @Ajaykumar661! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

Meghana-MSFT commented 2 months ago

Same issue is being tracked here https://stackoverflow.com/questions/78618577/reply-to-a-conversation-thread-in-teams-using-teams-bot. Please follow above thread for further updates. Thank you.

Ajaykumar661 commented 2 months ago

@Meghana-MSFT I'm the author for the same thread you shared above... I didn't get any response yet..