Posting messages to matrix
This commit is contained in:
48
app/Notifications/Matrix.php
Normal file
48
app/Notifications/Matrix.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?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;
|
||||
}
|
Reference in New Issue
Block a user