Fix Notifications
Some checks failed
Push image to registry / build-image (push) Failing after 4m19s

This commit is contained in:
2025-03-02 13:31:26 +01:00
parent 0014045d52
commit 17af60471b
4 changed files with 10 additions and 11 deletions

View File

@ -7,17 +7,21 @@ use App\Notification\Notification;
use App\Notification\NotificationBody\JobDebugNotificationBody;
use App\Notification\Stringifiable;
use App\Notification\Stringifiable\StringifiableSimpleText;
use Illuminate\Support\Facades\Log;
class JobDebugNotification extends Notification {
private string|null $title;
private string|null $screenShotProjectPath;
public function __construct(int $jobId, string $body, string $title = null, string $error = null, string $screenshotProjectPath = JobDebugScreenshot::getImgFileProjectPath($jobId), bool $isError = false) {
public function __construct(int $jobId, string $body, string $title = null, string $error = null, ?string $screenshotProjectPath = "", bool $isError = false) {
parent::__construct($jobId, isError:$isError);
$this->title = $title;
if ($screenshotProjectPath === "") {
$screenshotProjectPath = JobDebugScreenshot::getImgFileProjectPath($jobId);
}
$this->screenShotProjectPath = $screenshotProjectPath;
$this->setBody(new JobDebugNotificationBody($this->job, $this->title, $body, $error, $this->screenShotProjectPath != null));
$this->setBody(new JobDebugNotificationBody($this->job, $body, $error, $this->screenShotProjectPath != null));
}
public function getTitle(): Stringifiable {