Skip to content
Advertisement

How do you at (@) someone in slack using the laravel slack notification api?

I’ve got a functioning notification system that can post to Channel in our companies Slack. However, everything that comes across is just text. The linkNames is suppose to find/link user names in your content. I see that it gets set to “1” but has no affect when it shows up in the channel.

JavaScript

}

How it shows up in Slack

Is this a known issues, a version mismatch, or am I missing something?

Advertisement

Answer

https://api.slack.com/reference/surfaces/formatting#mentioning-users

To mention a user in app-published text, you need to provide their user ID in the following syntax:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement