Skip to content

[5.4] Add ability to send link_names parameter in Slack notification#18765

Merged
taylorotwell merged 1 commit into
laravel:5.4from
sevenpixels:slack-notifications-link-names
Apr 11, 2017
Merged

[5.4] Add ability to send link_names parameter in Slack notification#18765
taylorotwell merged 1 commit into
laravel:5.4from
sevenpixels:slack-notifications-link-names

Conversation

@sevenpixels

Copy link
Copy Markdown
Contributor

By default, leave link_names off. Added a method to enable link_names.

Signed-off-by: Donnie La Curan don.lacuran@gmail.com

By default, leave link_names off. Added a method to enable link_names.

Signed-off-by: Donnie La Curan <don.lacuran@gmail.com>
@taylorotwell

Copy link
Copy Markdown
Member

What are link_names?

@m1guelpf

Copy link
Copy Markdown
Contributor

@taylorotwell
link_names
As it stands right now, if you send over @channel or @username or #channel it is just text. However, if you set this parameter to 1 it will then create a link. This is good in instances where you have notifications turned on in Slack. You get the alert in Slack and can check the channel it was posted in.

https://api.slack.com/docs/message-formatting

If you wanted to maintain the same way it works today, just default it to 0 and then when you call the method it sets the value to 1.

https://gist.github.com/sevenpixels/9bccead7fb460653eac1c934beb472cd

@taylorotwell
taylorotwell merged commit 1a51a91 into laravel:5.4 Apr 11, 2017
@GrahamCampbell GrahamCampbell changed the title Add ability to send link_names parameter in Slack notification [5.4] Add ability to send link_names parameter in Slack notification Apr 13, 2017
@sevenpixels
sevenpixels deleted the slack-notifications-link-names branch April 14, 2017 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants