Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Email: Not receiving emails when display becomes online #2941

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/Xmds/Soap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2768,6 +2768,8 @@ protected function alertDisplayUp(): void
private function isInsideOperatingHours(): bool
{
$dayPartId = $this->display->getSetting('dayPartId', null, ['displayOverride' => true]);

// If dayPart is configured, check operating hours
if ($dayPartId !== null) {
try {
$dayPart = $this->dayPartFactory->getById($dayPartId);
Expand Down Expand Up @@ -2801,15 +2803,15 @@ private function isInsideOperatingHours(): bool

// check if we are inside the operating hours for this display - we use that flag to decide
// if we need to create a notification and send an email.
if (($now >= $startTime && $now <= $endTime)) {
return true;
}
return ($now >= $startTime && $now <= $endTime);
} catch (NotFoundException) {
$this->getLog()->debug('Unknown dayPartId set on Display Profile for displayId '
. $this->display->displayId);
}
}
return false;

// Otherwise, assume CMS is within operating hours.
return true;
}

/**
Expand Down