feat: add Webhook content message

This commit is contained in:
Maël Gangloff
2024-08-17 00:36:00 +02:00
parent 64aba20a93
commit bb96da8fe3
8 changed files with 85 additions and 43 deletions

View File

@@ -25,7 +25,11 @@ class DomainUpdateNotification extends Notification implements ChatNotificationI
public function asChatMessage(?RecipientInterface $recipient = null, ?string $transport = null): ?ChatMessage
{
$this->subject('Domain Updated');
$ldhName = $this->domainEvent->getDomain()->getLdhName();
$action = $this->domainEvent->getAction();
$this->subject("Success: Domain Updated $ldhName")
->content("Domain name $ldhName information has been updated ($action).")
->importance(Notification::IMPORTANCE_HIGH);
return ChatMessage::fromNotification($this);
}