Don't send notifications when within maintenance window. Fixes #2720
This commit is contained in:
committed by
Nico Stapelbroek
parent
8485821491
commit
f53f88f950
@@ -14,6 +14,7 @@ namespace CachetHQ\Cachet\Integrations\Core;
|
||||
use CachetHQ\Cachet\Integrations\Contracts\System as SystemContract;
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
use CachetHQ\Cachet\Models\Schedule;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
use Illuminate\Contracts\Config\Repository;
|
||||
|
||||
@@ -102,6 +103,16 @@ class System implements SystemContract
|
||||
return $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if Cachet has any open maintenance windows.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function underMaintenance()
|
||||
{
|
||||
return Schedule::inProgress()->count() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cachet version.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user