slack-java-webhook icon indicating copy to clipboard operation
slack-java-webhook copied to clipboard

Tag (mention) someone while posting

Open adriens opened this issue 8 years ago • 2 comments

Hi, i need to post to slack from webhook and your api perfectly does the trick. Indeed, i'd like to tag (mention) someone while posting from the webhook on a given channel.

It's exactly the same thing as the one described here : https://stackoverflow.com/questions/40771924/how-to-mention-user-in-slack-client

Is it feasible and if it does, could you please provide me some code snippet ?

Thanks in advance for your help.

Best Regards.

adriens avatar Dec 09 '17 05:12 adriens

@adriens I don't have a machine at hand to try this but you can pass the value of parse argument to full and try. This is assuming you've @<username> in your message.

ashwanthkumar avatar Dec 12 '17 02:12 ashwanthkumar

@ashwanthkumar - Setting parse("full") does work but then any links in your messages are no longer formatted. The easiest way to get this to work was to use the format in the article above: <@username>

szaluk avatar May 13 '19 19:05 szaluk