Remove CommProtocolReceive commands, Remove protocol onConnect() functions, pass Setup::class to protocols

This commit is contained in:
2024-11-09 08:58:09 +11:00
parent 72ad1307c5
commit bf3fce252d
10 changed files with 31 additions and 203 deletions

View File

@@ -10,6 +10,7 @@ use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\ManuallyFailedException;
use Illuminate\Queue\MaxAttemptsExceededException;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Notification;
@@ -85,6 +86,7 @@ class AddressPoll implements ShouldQueue, ShouldBeUnique
}
Log::info(sprintf('%s:- Polling [%s] - attempt [%d]',self::LOGKEY,$this->ao->ftn,$this->attempts()));
$setup = Config::get('setup',Setup::findOrFail(config('app.id')));
foreach ($this->ao->system->mailer_preferred as $o) {
// If we chose a protocol, skip to find the mailer details for it
@@ -93,12 +95,12 @@ class AddressPoll implements ShouldQueue, ShouldBeUnique
switch ($o->name) {
case 'BINKP':
$s = new Binkp;
$s = new Binkp($setup);
break;
case 'EMSI':
$s = new EMSI;
$s = new EMSI($setup);
break;