Skip to content

Commit 25c6061

Browse files
committed
wip
1 parent 2121981 commit 25c6061

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/Dtos/DevNotificationDto.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ protected function setAttachmentLink($title = null): self
127127
return $this;
128128
}
129129

130-
public function jsonSerialize()
130+
public function renderMessage(): string
131131
{
132132
$message = $this->message;
133133

@@ -143,8 +143,13 @@ public function jsonSerialize()
143143
$message .= "| Line[{$this->line}]";
144144
}
145145

146+
return $message;
147+
}
148+
149+
public function jsonSerialize()
150+
{
146151
return [
147-
'message' => $message,
152+
'message' => $this->renderMessage(),
148153
'attachment_title' => $this->attachment_title,
149154
'attachment_content' => $this->attachment_content,
150155
];

src/Notifications/DevNotification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function toSlack()
3030
(
3131
(new SlackMessage())
3232
->from(env('APP_NAME'))
33-
->content($this->notificationDto->message)
33+
->content($this->notificationDto->renderMessage())
3434
),
3535
function (SlackMessage $message) {
3636
if ($this->notificationDto->hasAttachment()) {

0 commit comments

Comments
 (0)