As you know, the Microsoft bot framework is mutli-channel, therefore, when users start talking to a bot from Teams, they may mention it in order to interact with your bot.
So far so good but you should mind the mention as it it sent to your bot on the form:
meaning that if you leave it “as is” and if you’re using LUIS behind the scenes, your bot will suddenly misunderstand a lot of things. Therefore, make sure to remove the mentions as your first coding action:
activity.Text = Regex.Replace(activity.Text, "<at>.*</at>", "", RegexOptions.IgnoreCase).Trim();