Bot not receiving message update events

Nitesh 0 Reputation points
2023-06-20T11:17:21.4266667+00:00

Versions

botbuilder SDK version: ^4.18.0
nodejs version: 14.16.1

Describe the bug

I set up a simple bot to welcome users when they join the conversation as mentioned in the sample. The code sample handles the event in this.onMessage block so that when any channel member sends any message in the channel, we receive event for that.
Note: I did gave RSC permissions to bot and updated menifest.js file as mentioned in the doc.

So far so good. I am getting all the new message event across channels of team in which the bot is installed. I extend this code to handle other events such as: this.onTeamsMessageSoftDelete, this.onMessageDelete, this.onMessageUpdate. I see support for handling these type of messages was introduced by this pr. Problem is my bot doesn't get any event when a message is updated/ deleted in the channel. Am I missing something or it's a bug?

I have double checked permissions for my bot application, and they look good to me. Any help would be appreciated. Thanks in advance !

To Reproduce

Steps to reproduce the behavior:

  1. Set up the bot mentioned above
  2. Give RSC permissions and update menifest.js file to receive all conversation messages with RSC
  3. Add a handler this.onMessageDelete or this.onMessageUpdate below this.onMessage
  4. Update/delete message in teams -> this.onMessageDelete/this.onMessageDelete block is not executed

Expected behavior

Bot should receive event when any message is updated or deleted in channel.

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
941 questions
Microsoft Teams Development
Microsoft Security Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Nivedipa-MSFT 3,646 Reputation points Microsoft External Staff Moderator
    2023-06-22T06:21:50.9966667+00:00

    @Nitesh -
    There can be several reasons why a bot is not receiving message update events in Microsoft Teams. Here are a few potential causes:

    Missing bot subscription: Ensure that your bot is subscribed to the relevant events, including the message update events. In the bot's code or configuration, verify that the subscription to the messageUpdate event is properly set up.

    Scope or permission limitations: Certain scopes or permissions might be required for your bot to receive message update events. Check the required scopes and permissions in your bot's configuration and make sure they are correctly set.

    Timing and event availability: Message update events are triggered when a user modifies or updates a message in a conversation. It's important to note that not all message updates will trigger this event. For example, edits made to a message after a certain time frame or specific types of message updates may not generate the event.

    Message update event handling: Ensure that your bot's code or logic is correctly handling message update events. Double-check that you have implemented the appropriate event handlers and processing steps to capture and respond to these events.

    Backend or infrastructure issues: If your bot is hosted on a specific server or infrastructure, check for any connectivity or configuration issues that might prevent the bot from receiving message update events. Ensure that the necessary network and firewall settings are correctly configured.

    To troubleshoot the issue further, you can check the logs or diagnostic information from your bot's hosting environment to see if any errors or exceptions are being logged related to message update events.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.