OnTeamsReadReceiptAsync is never hit. There is no event to use this method.
Bot framework .NET SDK has OnTeamsReadReceiptAsync and Teams App Studio offers RSC permission to receive the read receipts. However the read receipt event never arrives. Configurations:
- Bot.cs is as following MyBot : TeamsActivityHandler.
- 'protected override async Task OnTeamsReadReceiptAsync' method implemented under MyBot
- Teams App manifest includes following RSC permissions:
- ChatMessage.Read.Chat
- ChatMessageReadReceipt.Read.Chat
With the above config. the bot never receives read receipt event. Also the documentation doesn't show any read receipt event : https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/subscribe-to-conversation-events?tabs=dotnet#conversation-update-events
To Reproduce
Steps to reproduce the behavior:
- Create a bot that inherits from TeamsActivityHandler
- Create the Teams manifest to include RSC permissions stated above.
- Send a message to user and make sure that user has opened the message.
- Monitor the incoming request on the server. (Nothing arrives regarding to read receipts)
Thanks @cagrimunyas, I'm investigating.
Thank you @cagrimunyas,
I'm able to reproduce this issue using sample 25.message-reaction.
In MessageReactionBot.cs, I made the following changes:
- Inherit from
TeamsActivityHandlerinstead of ActivityHandlder - Overrode the following
OnTeamsReadReceiptAsyncevent handler method:protected override async Task OnTeamsReadReceiptAsync( ReadReceiptInfo readReceiptInfo, ITurnContext<IEventActivity> turnContext, CancellationToken cancellationToken ) { string onReadMessage = "User has read the message"; await turnContext.SendActivityAsync(onReadMessage); }
After the bot sends a message and the message is read in the chat, the OnTeamsReadReceiptAsync method, that overrides the event handler, is not activated.
My manifest.json testing file
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.14/MicrosoftTeams.schema.json",
"manifestVersion": "1.14",
"version": "1.0.0",
"id": "67fe6d........242af",
"packageName": "com.teams.sample.messageReaction",
"developer": {
"name": "MessageReactionBot",
"websiteUrl": "https://www.microsoft.com",
"privacyUrl": "https://www.teams.com/privacy",
"termsOfUseUrl": "https://www.teams.com/termsofuser"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "MessageReactionBot",
"full": "MessageReactionBot"
},
"description": {
"short": "MessageReactionBot",
"full": "MessageReactionBot"
},
"accentColor": "#FFFFFF",
"bots": [
{
"botId": "67fe6d........242af",
"scopes": [
"groupchat",
"team",
"personal"
],
"isNotificationOnly": false,
"supportsCalling": false,
"supportsVideo": false,
"supportsFiles": false
}
],
"authorization": {
"permissions": {
"resourceSpecific": [
{
"type": "Application",
"name": "ChatMessageReadReceipt.Read.Chat"
},
{
"type": "Application",
"name": "ChatMessage.Read.Chat"
}
]
}
},
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"*"
]
}
@cagrimunyas, I will let the engineers know about this and report back. Thanks!
Hi @cagrimunyas,
the Teams engineers mentioned that the OnTeamsReadReceiptAsync feature hasn't been globally released as of Sep 6, 2023.
We don't yet have an ETA on its availability. Given the uncertainty around the timeline, We'll be closing this issue for now.
Please feel free to reopen or create a new issue if you have further questions in the future. Thank you for your understanding!
@rampaged is there any update on this?
CC @stevkan @dmvtech
@Prasad-MSFT - Are you associated with the Microsoft Teams Development team? If so, are you able to provide an update or any information to the customer regarding the OnTeamsReadReceiptAsync activity handler and if/when it might be added to the Conversation Update events list?