File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
src/Illuminate/Notifications Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ protected function buildJsonPayload(SlackMessage $message)
59
59
'icon_emoji ' => data_get ($ message , 'icon ' ),
60
60
'icon_url ' => data_get ($ message , 'image ' ),
61
61
'channel ' => data_get ($ message , 'channel ' ),
62
+ 'link_names ' => data_get ($ message , 'linkNames ' ),
62
63
]);
63
64
64
65
return array_merge ([
Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ class SlackMessage
48
48
*/
49
49
public $ content ;
50
50
51
+ /**
52
+ * Linkify channel names and usernames.
53
+ *
54
+ * @var bool
55
+ */
56
+ public $ linkNames = 0 ;
57
+
51
58
/**
52
59
* The message's attachments.
53
60
*
@@ -98,6 +105,18 @@ public function error()
98
105
return $ this ;
99
106
}
100
107
108
+ /**
109
+ * Find and link channel names and usernames.
110
+ *
111
+ * @return $this
112
+ */
113
+ public function linkNames ()
114
+ {
115
+ $ this ->linkNames = 1 ;
116
+
117
+ return $ this ;
118
+ }
119
+
101
120
/**
102
121
* Set a custom username and optional emoji icon for the Slack message.
103
122
*
You can’t perform that action at this time.
0 commit comments