Include unsubscribe link in Slack footer
This commit is contained in:
@@ -143,14 +143,15 @@ class ComponentStatusChangedNotification extends Notification
|
|||||||
return (new SlackMessage())
|
return (new SlackMessage())
|
||||||
->$status()
|
->$status()
|
||||||
->content(trans('notifications.component.status_update.title'))
|
->content(trans('notifications.component.status_update.title'))
|
||||||
->attachment(function ($attachment) use ($content) {
|
->attachment(function ($attachment) use ($content, $notifiable) {
|
||||||
$attachment->title($content, cachet_route('status-page'))
|
$attachment->title($content, cachet_route('status-page'))
|
||||||
->fields(array_filter([
|
->fields(array_filter([
|
||||||
'Component' => $this->component->name,
|
'Component' => $this->component->name,
|
||||||
'Old Status' => $this->component->human_status,
|
'Old Status' => $this->component->human_status,
|
||||||
'New Status' => trans("cachet.components.status.{$this->status}"),
|
'New Status' => trans("cachet.components.status.{$this->status}"),
|
||||||
'Link' => $this->component->link,
|
'Link' => $this->component->link,
|
||||||
]));
|
]))
|
||||||
|
->footer(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,9 +76,10 @@ return [
|
|||||||
|
|
||||||
// Subscriber
|
// Subscriber
|
||||||
'subscriber' => [
|
'subscriber' => [
|
||||||
'subscribe' => 'Subscribe to get the updates',
|
'subscribe' => 'Subscribe to get the updates',
|
||||||
'button' => 'Subscribe',
|
'unsubscribe' => 'Unsubscribe at :link',
|
||||||
'manage' => [
|
'button' => 'Subscribe',
|
||||||
|
'manage' => [
|
||||||
'no_subscriptions' => 'You\'re currently subscribed to all updates.',
|
'no_subscriptions' => 'You\'re currently subscribed to all updates.',
|
||||||
'my_subscriptions' => 'You\'re currently subscribed to the following updates.',
|
'my_subscriptions' => 'You\'re currently subscribed to the following updates.',
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user