microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Newer version of Teams incorrectly parses messages with at mentions

nodkrot opened this issue · comments

Version

In versions greater than 1.5.00.26358

Describe the bug

We noticed that at mentions formatting started to have unexpected behavior where it breaks down single users name into multiple at mentions. See examples below.

To Reproduce

Using RSC to receive channel messages in the manifest, send a message in the channel with an at mention. Activity payload comes in like so:

  "text": "<at>Zzzz</at> <at>Ee</at> <at>Aaaa</at>",
  ...
  "entities": [
    {
      "mentioned": {
        "id": "29:1tYwtgp56UKjOlsdfsefs3fsesfsfVP78kWJ-x5Nr9OKj1Ls50S06Gq_cNs3VPyjiGyMGvZk4k6e8OHey9yJDw",
        "name": "Zzzz"
      },
      "text": "<at>Zzzz</at>",
      "type": "mention"
    },
    {
      "mentioned": {
        "id": "29:1tYwtgp56UKjOlsdfsefs3fsesfsfVP78kWJ-x5Nr9OKj1Ls50S06Gq_cNs3VPyjiGyMGvZk4k6e8OHey9yJDw",
        "name": "Ee"
      },
      "text": "<at>Ee</at>",
      "type": "mention"
    },
    {
      "mentioned": {
        "id": "29:1tYwtgp56UKjOlsdfsefs3fsesfsfVP78kWJ-x5Nr9OKj1Ls50S06Gq_cNs3VPyjiGyMGvZk4k6e8OHey9yJDw",
        "name": "Aaaa"
      },
      "text": "<at>Aaaa</at>",
      "type": "mention"
    }
  ],

Expected behavior

  "text": "<at>Zzzz Ee Aaaa</at>",
  ...
  "entities": [
    {
      "mentioned": {
        "id": "29:1tYwtgp56UKjOlkjJU3J6RcLNRKYJWVP78kWJ-x5Nr9OKj1Ls50S06Gq_cNs3VPyjiGyMGvZk4k6e8OHey9yJDw",
        "name": "Zzzz Ee Aaaa"
      },
      "text": "<at>Zzzz Ee Aaaa</at>",
      "type": "mention"
    }
  ],

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Bumping this up

Hey @ceciliaavila, did you get a chance to reproduce this issue?

Could you guys provide an ETA when someone can confirm this issue?

Could you guys provide an ETA when someone can confirm this issue?

Hi @nodkrot, we have this issue in our backlog. We will probably work on it next week.

Hi @tracyboehrer @nodkrot,

We've successfully reproduced the reported issue. During our investigation, we traced back the chain of calls to turnContext.Activity.Text. And while debugging, we discovered that in the CloudAdapter class, particularly within the ProcessAsync method responsible for handling inbound HTTP requests, the HTTP request's body already contains the incorrectly parsed username in its text property.

This means that the issue arises before reaching BotBuilder, implicating Teams as the likely source of the problem. Therefore, it is advised to forward this issue to the Microsoft team responsible for Teams development for resolution.

CloudAdapter ProcessAsync method
image_6617

Thank you for looking into this. Could let us know how can we reach out to them? I would assume this is something that you guys could do a lot faster than us.

Hi @tracyboehrer, can you please forward this issue to the MSTeams team?
Thanks!

Hey @ceciliaavila @tracyboehrer were you guys able to forward this? Is there a place where we can check on the progerss?

@nodkrot Apologies for the delay. This has been forwarded to Teams for guidance.

The fix for this is rolling out in Teams. I do not have an ETA when that fix will be live yet. Will update this issue when the rollout is expected/complete.