Fix styling
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
41fb6a1fc9
commit
d86274cc37
@@ -14,7 +14,6 @@ class ContainerRestarted extends Notification implements ShouldQueue
|
||||
|
||||
public $tries = 1;
|
||||
|
||||
|
||||
public function __construct(public string $name, public Server $server, public ?string $url = null)
|
||||
{
|
||||
}
|
||||
@@ -33,30 +32,34 @@ class ContainerRestarted extends Notification implements ShouldQueue
|
||||
'serverName' => $this->server->name,
|
||||
'url' => $this->url,
|
||||
]);
|
||||
|
||||
return $mail;
|
||||
}
|
||||
|
||||
public function toDiscord(): string
|
||||
{
|
||||
$message = "Coolify: A resource ({$this->name}) has been restarted automatically on {$this->server->name}";
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
public function toTelegram(): array
|
||||
{
|
||||
$message = "Coolify: A resource ({$this->name}) has been restarted automatically on {$this->server->name}";
|
||||
$payload = [
|
||||
"message" => $message,
|
||||
'message' => $message,
|
||||
];
|
||||
if ($this->url) {
|
||||
$payload['buttons'] = [
|
||||
[
|
||||
[
|
||||
"text" => "Check Proxy in Coolify",
|
||||
"url" => $this->url
|
||||
]
|
||||
]
|
||||
'text' => 'Check Proxy in Coolify',
|
||||
'url' => $this->url,
|
||||
],
|
||||
],
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
return $payload;
|
||||
}
|
||||
}
|
||||
|
@@ -32,30 +32,34 @@ class ContainerStopped extends Notification implements ShouldQueue
|
||||
'serverName' => $this->server->name,
|
||||
'url' => $this->url,
|
||||
]);
|
||||
|
||||
return $mail;
|
||||
}
|
||||
|
||||
public function toDiscord(): string
|
||||
{
|
||||
$message = "Coolify: A resource ($this->name) has been stopped unexpectedly on {$this->server->name}";
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
public function toTelegram(): array
|
||||
{
|
||||
$message = "Coolify: A resource ($this->name) has been stopped unexpectedly on {$this->server->name}";
|
||||
$payload = [
|
||||
"message" => $message,
|
||||
'message' => $message,
|
||||
];
|
||||
if ($this->url) {
|
||||
$payload['buttons'] = [
|
||||
[
|
||||
[
|
||||
"text" => "Open Application in Coolify",
|
||||
"url" => $this->url
|
||||
]
|
||||
]
|
||||
'text' => 'Open Application in Coolify',
|
||||
'url' => $this->url,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
return $payload;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user