This repository was archived by the owner on Jan 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
[Skype] Group conversations: mention is not removed from Text in RemoveRecipientMention #3067
Copy link
Copy link
Closed
Labels
bugIndicates an unexpected problem or an unintended behavior.Indicates an unexpected problem or an unintended behavior.
Description
System Information
- SDK Language: C#
- SDK Version: BotBuilder 3.8.3 (latest NuGet package)
- Development Environment: Localhost.
- Channel: Bug on Skype, OK on Slack
Issue Description
There is a bug on the way the Mentions are managed in Skype that is linked to the <at> tag that is added in the text of the message.
When you want to get the text of a message without the recipient mention by calling RemoveRecipientMention, the mention will not be removed from the text.
Code Example
The following code is used for the demo below:
var incomingMessage = context.Activity.AsMessageActivity();
var mentionFound = (incomingMessage.Entities?.Where(entity => String.Compare(entity.Type, "mention", ignoreCase: true) == 0).Select(e => e.Properties.ToObject<Mention>()).ToArray() ?? new Mention[0]).Where(mention => mention.Mentioned.Id == context.Activity.Recipient.Id).FirstOrDefault();
if (mentionFound != null)
{
await context.PostAsync($"Activity.Text= {incomingMessage.Text}" +
$"\n\nMention.Text= {mentionFound.Text}" +
$"\n\nAfter RemoveRecipientMention()= { incomingMessage.RemoveRecipientMention() }" +
$"\n\n\n\nChannelData= { Newtonsoft.Json.JsonConvert.SerializeObject(incomingMessage.ChannelData).Replace("<", "<").Replace(">", ">") }" +
$"\n\nMention json= {Newtonsoft.Json.JsonConvert.SerializeObject(mentionFound).Replace("<", "<").Replace(">", ">")}"
);
}Steps to Reproduce the Issue
- Deploy your bot on Skype
- Connect to https://web.skype.com/en/?ecsoverride=developer (or use Skype App but in that case put your mention in the beginning of the message)
- Create a group conversation
- In this conversation, type a message with a mention to the bot
- In the bot code treating this message, call
RemoveRecipientMention()on the messageText
Expected Behavior
The Text should not contain the bot name mentioned on Skype when using RemoveRecipientMention() on the message text.
Actual Results
Demo:
Valid on Slack (mention removed successfully):

The problem seems to be the mismatch between the Activity.Text where the <at> tag is not present and the Mention.Text which contains it.
As a consequence, the method Regex called in RemoveRecipientMention cannot do its work.
cajomferro
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or an unintended behavior.Indicates an unexpected problem or an unintended behavior.
