2021-07-15 14:54:23 +00:00
|
|
|
<?php
|
|
|
|
|
2021-09-12 12:14:04 +00:00
|
|
|
namespace App\Classes\FTN\Process\Netmail;
|
2021-07-15 14:54:23 +00:00
|
|
|
|
2023-07-23 07:27:52 +00:00
|
|
|
use Illuminate\Support\Facades\Notification;
|
2021-07-18 12:10:21 +00:00
|
|
|
use Illuminate\Support\Facades\Log;
|
2021-07-15 14:54:23 +00:00
|
|
|
|
|
|
|
use App\Classes\FTN\{Message,Process};
|
2023-07-23 07:27:52 +00:00
|
|
|
use App\Notifications\Netmails\Ping as PingNotification;
|
2021-07-15 14:54:23 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Process messages to Ping
|
|
|
|
*
|
|
|
|
* @package App\Classes\FTN\Process
|
|
|
|
*/
|
|
|
|
final class Ping extends Process
|
|
|
|
{
|
2021-08-19 06:59:12 +00:00
|
|
|
private const LOGKEY = 'RP-';
|
|
|
|
|
2021-07-15 14:54:23 +00:00
|
|
|
public static function handle(Message $msg): bool
|
|
|
|
{
|
|
|
|
if (strtolower($msg->user_to) !== 'ping')
|
|
|
|
return FALSE;
|
|
|
|
|
2021-08-19 06:59:12 +00:00
|
|
|
Log::info(sprintf('%s:- Processing PING message from (%s) [%s]',self::LOGKEY,$msg->user_from,$msg->fftn));
|
2021-07-15 14:54:23 +00:00
|
|
|
|
2023-07-23 07:27:52 +00:00
|
|
|
Notification::route('netmail',$msg->fftn_o)->notify(new PingNotification($msg));
|
2021-07-15 14:54:23 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
}
|