Forum Discussion
AlexK480
Jul 31, 2023Copper Contributor
Teams Bot - user conversation objects are becoming stale, breaking the ability to send proactive msg
Hi, we develop a 3rd party app on the MS Teams store, which includes functionality to send proactive messages to users. The outline of the code we are using is as follows: Our deployed bot listens...
- Aug 19, 2023Hey, we ended up working through the issue on our end - turns out the conversations were not stale after all, it was an issue with multiple tenant IDs. So you can close off the issue, the conversation objects themselves were still valid.
As a side note, if this issue comes up for us in the future or anyone else, there is a better approach than our initial approach we tested during debugging this issue. You can save just the conversation, user, bot ids and serviceUrl (instead of the whole conversation object), and get a fresh conversation reference prior to a proactive message using BotBuilder.TurnContext.getConversationReference(conversationRefData);
Sayali-MSFT
Microsoft
Aug 07, 2023AlexK480 - Microsoft Teams supports proactive messaging, which allows your bot to initiate conversations with users without waiting for them to send a message first. By using proactive messages, you can ensure that your bot always has the latest conversation context. This way, you won't need to rely solely on responding to incoming messages.
Reference Document-https://learn.microsoft.com/en-us/microsoftteams/platform/resources/bot-v3/bot-conversations/bots-conv-proactive?tabs=csharp
We are checking with the internal team as well and let you know the update once we have any.
- AlexK480Aug 13, 2023Copper ContributorThanks, please let us know if you hear anything back from your internal teams. Just to clarify, we know what proactive messaging is and are actively using it in our app. The problem is that the proactive messaging occasionally breaks, with a workaround to restore it, but it still breaks. If it helps your teams, I have an example of a conversation reference (JSON object that I would need to share over a private channel) that was saved and is no longer valid to send proactive messages to.
- Sayali-MSFTAug 14, 2023
Microsoft
AlexK480-Sure, you can send the information through mail.
mail ID-microsoftteamsdev@microsoft.com- Sayali-MSFTAug 18, 2023
Microsoft
AlexK480-Did you get a chance to send the details to the above email?