diff --git a/backend/backend/services/alertService.js b/backend/backend/services/alertService.js index fde5683064..f41f610f91 100755 --- a/backend/backend/services/alertService.js +++ b/backend/backend/services/alertService.js @@ -3770,9 +3770,14 @@ module.exports = { } }; - const incidentAlert = subscriber.notificationType?.incident; + let incidentAlert = subscriber.notificationType?.incident; const statusPageId = subscriber?.statusPageId; + // if there is no notification type, then set incidentAlert to true. + if (!subscriber.notificationType) { + incidentAlert = true; + } + if (!statusPageId) { sendAlerts(); } else { @@ -4986,10 +4991,14 @@ module.exports = { } }; - const scheduledEventAlert = + let scheduledEventAlert = subscriber.notificationType?.scheduledEvent; const statusPageId = subscriber?.statusPageId; + if (!subscriber.notificationType) { + scheduledEventAlert = true; + } + if (!statusPageId) { sendAlerts(); } else { @@ -5422,10 +5431,15 @@ module.exports = { } }; - const announcementAlert = + let announcementAlert = subscriber.notificationType?.announcement; const statusPageId = subscriber?.statusPageId; + // if there is no notification type, then set incidentAlert to true. + if (!subscriber.notificationType) { + announcementAlert = true; + } + if (!statusPageId) { sendAlerts(); } else { diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index c97b497ee7..6679172dda 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -203,6 +203,7 @@ services: - IS_SAAS_SERVICE=${IS_SAAS_SERVICE} - SCRIPT_RUNNER_URL=http://script-runner:3009 - CLUSTER_KEY=test + - REALTIME_URL=http://realtime:3300 depends_on: - mongo - redis diff --git a/package.json b/package.json index bda3bcc0e1..86fc5f8e65 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "prod": "docker-compose up -d", "dev": "npm run build-dev $npm_config_services && npm run run-enterprise-dev $npm_config_services", "saas-dev": "export IS_SAAS_SERVICE=true && npm run dev $npm_config_services", - "run-enterprise-dev": "DOCKER_CLIENT_TIMEOUT=240 && COMPOSE_HTTP_TIMEOUT=240 && docker-compose -f docker-compose.dev.yml up -d $npm_config_services", + "run-enterprise-dev": "DOCKER_CLIENT_TIMEOUT=1000 && COMPOSE_HTTP_TIMEOUT=1000 && docker-compose -f docker-compose.dev.yml up -d $npm_config_services", "stop-dev": "docker-compose -f docker-compose.dev.yml down --remove-orphans", "staging-test": "cd tests && npm run-script staging-test", "remove-all-containers": "docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q) || echo 'No running containers'",