Fix notifications. Add message. Closes #2338
This commit is contained in:
@@ -78,6 +78,7 @@ class NewIncidentNotification extends Notification
|
||||
->greeting(trans('notifications.incident.new.mail.greeting', ['app_name' => Config::get('setting.app_name')]))
|
||||
->line($content)
|
||||
->action(trans('notifications.incident.new.mail.action'), cachet_route('incident', [$this->incident]))
|
||||
->line($this->incident->message)
|
||||
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
|
||||
}
|
||||
|
||||
@@ -121,7 +122,7 @@ class NewIncidentNotification extends Notification
|
||||
return (new SlackMessage())
|
||||
->$status()
|
||||
->content($content)
|
||||
->attachment(function ($attachment) use ($content) {
|
||||
->attachment(function ($attachment) use ($content, $notifiable) {
|
||||
$attachment->title(trans('notifications.incident.new.slack.title', [$this->incident->name]))
|
||||
->timestamp($this->incident->getWrappedObject()->occurred_at)
|
||||
->fields(array_filter([
|
||||
|
||||
@@ -70,8 +70,8 @@ class IncidentUpdatedNotification extends Notification
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
$content = trans('notifications.incident.update.mail.content', [
|
||||
'name' => $this->update->incident->name,
|
||||
'time' => $this->update->created_at_diff,
|
||||
'name' => $this->update->incident->name,
|
||||
'time' => $this->update->created_at_diff,
|
||||
]);
|
||||
|
||||
return (new MailMessage())
|
||||
@@ -82,6 +82,7 @@ class IncidentUpdatedNotification extends Notification
|
||||
]))
|
||||
->line($content)
|
||||
->action(trans('notifications.incident.update.mail.action'), cachet_route('incident', [$this->update->incident]))
|
||||
->line($this->update->message)
|
||||
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
|
||||
}
|
||||
|
||||
@@ -111,7 +112,8 @@ class IncidentUpdatedNotification extends Notification
|
||||
public function toSlack($notifiable)
|
||||
{
|
||||
$content = trans('notifications.incident.update.slack.content', [
|
||||
'name' => $this->update->incident->name,
|
||||
'name' => $this->update->incident->name,
|
||||
'new_status' => $this->update->human_status,
|
||||
]);
|
||||
|
||||
$status = 'info';
|
||||
@@ -127,7 +129,7 @@ class IncidentUpdatedNotification extends Notification
|
||||
return (new SlackMessage())
|
||||
->$status()
|
||||
->content($content)
|
||||
->attachment(function ($attachment) use ($content) {
|
||||
->attachment(function ($attachment) use ($content, $notifiable) {
|
||||
$attachment->title(trans('notifications.incident.update.slack.title', [
|
||||
'name' => $this->update->incident->name,
|
||||
'new_status' => $this->update->human_status,
|
||||
|
||||
Reference in New Issue
Block a user