Merge pull request #3423 from AntonioKL/patching-manage-subscribtion

Patching manage subscription
This commit is contained in:
James Brooks
2019-07-11 13:06:46 +01:00
committed by GitHub
5 changed files with 5 additions and 14 deletions
@@ -52,10 +52,6 @@ class SubscribersConfigured
*/
public function handle(Request $request, Closure $next)
{
if (!$this->config->get('setting.enable_subscribers')) {
return cachet_redirect('status-page');
}
return $next($request);
}
}
@@ -140,7 +140,7 @@ class ComponentStatusChangedNotification extends Notification
return (new SlackMessage())
->$status()
->content(trans('notifications.component.status_update.slack.subject'))
->content(trans('notifications.component.status_update.slack.title'))
->attachment(function ($attachment) use ($content, $notifiable) {
$attachment->title($content, cachet_route('status-page'))
->fields(array_filter([
@@ -133,8 +133,7 @@ class NewIncidentNotification extends Notification
->fields(array_filter([
'ID' => "#{$this->incident->id}",
'Link' => $this->incident->permalink,
]))
->footer(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
]));
});
}
}
@@ -124,8 +124,7 @@ class NewScheduleNotification extends Notification implements ShouldQueue
->fields(array_filter([
'ID' => "#{$this->schedule->id}",
'Status' => $this->schedule->human_status,
]))
->footer(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
]));
});
}
}