clrghouz/app/Notifications/Matrix.php
Deon George a46ce7ff9e
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 42s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m55s
Create Docker Image / Final Docker Image Manifest (push) Successful in 11s
Posting messages to matrix
2024-06-11 17:23:59 +10:00

48 lines
888 B
PHP

<?php
namespace App\Notifications;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
use App\Classes\FTN\Message;
use App\Models\{Echoarea,Echomail,Setup};
abstract class Matrix extends Notification implements ShouldQueue
{
use Queueable;
protected const via = 'matrix';
private const LOGKEY = 'NM-';
/**
* Create a new notification instance.
*/
public function __construct()
{
$this->queue = 'matrix';
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [ self::via ];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return Echomail
* @throws \Exception
*/
abstract public function toMatrix(object $notifiable): mixed;
}