File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ protected function setAttachmentLink($title = null): self
127
127
return $ this ;
128
128
}
129
129
130
- public function jsonSerialize ()
130
+ public function renderMessage (): string
131
131
{
132
132
$ message = $ this ->message ;
133
133
@@ -143,8 +143,13 @@ public function jsonSerialize()
143
143
$ message .= "| Line[ {$ this ->line }] " ;
144
144
}
145
145
146
+ return $ message ;
147
+ }
148
+
149
+ public function jsonSerialize ()
150
+ {
146
151
return [
147
- 'message ' => $ message ,
152
+ 'message ' => $ this -> renderMessage () ,
148
153
'attachment_title ' => $ this ->attachment_title ,
149
154
'attachment_content ' => $ this ->attachment_content ,
150
155
];
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function toSlack()
30
30
(
31
31
(new SlackMessage ())
32
32
->from (env ('APP_NAME ' ))
33
- ->content ($ this ->notificationDto ->message )
33
+ ->content ($ this ->notificationDto ->renderMessage () )
34
34
),
35
35
function (SlackMessage $ message ) {
36
36
if ($ this ->notificationDto ->hasAttachment ()) {
You can’t perform that action at this time.
0 commit comments