Hi,
Can't figure out how the bot can mention a certain user when replying to a group conversation?
Don't see a way to specify Mentions[] when creating Activity object as a reply using .NET API.
Does anyone know how to do that?
Thanks,
Alex
you should be able to mention the user in the reply by adding @{user.Name ?? user.Id} to the text in your reply. Different clients based on their capabilities decide to highligh the @mentioned user. As an alternative, you can also create a direct conversation to the user.
Nop, it doesn't work for Skype. It just puts this unformatted text with specific name and id as a part of response text.
Both for desktop version of Skype and mobile version which DOES support mentions.
Also I found a way in API to add mentions. It is like that:
Activity reply = blabla;
reply.Entities.Add ( new Mention () {Mentioned = activity.From});
However, it doesn't work either but does not produce any changes to reply. I mean there is no
any @{} in the response.
@msft-shahins I am facing same issue in slack . whenever we send @{username} , It just puts this unformatted text with specific name and id as a part of response text.
function public_channel_ensure(session){
var obj={"isGroup":false,"isAllow":false}
var address=session.message.address;
var message=session.message;
var botname=address.bot.name;
if(address.conversation.isGroup&&message.text){
var msgtoken=message.text.toLowerCase().trim().split(/\s+/);
var attachments=message.attachments||[]
if(attachments.length==0&&botname&&msgtoken.indexOf("@"+botname.toLowerCase())>-1){
obj["isGroup"]=true;obj["isAllow"]=true;
return obj;
}
else{obj["isGroup"]=true;obj["isAllow"]=false; return obj;}
}
else{return obj;}
}
What the hell, why i can't do this mention feature like slack.. Anybody is there who can i help on this shit ?
Most helpful comment
What the hell, why i can't do this mention feature like
slack.. Anybody is there who can i help on this shit ?