Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
arduinomaster22 committed Jan 13, 2025
1 parent bfa129d commit d072b05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
5 changes: 2 additions & 3 deletions src/Events/MailUnsuppressed.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@

class MailUnsuppressed
{
use Dispatchable, InteractsWithSockets, SerializesModels;,
use Dispatchable, InteractsWithSockets, SerializesModels;

/**
* Create a new event instance.
*/
public function __construct(public string $emailAddress, public string $driver, public ?string $stream_id = null)
{}
public function __construct(public string $emailAddress, public string $driver, public ?string $stream_id = null) {}
}
12 changes: 5 additions & 7 deletions src/Listeners/UnsuppressEmailAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ class UnsuppressEmailAddress
{
public function handle(MailUnsuppressed $event): void
{
$driver = MailProvider::with(driver: $event->driver);

if ($event->driver === 'postmark') {
$driver->unsuppressEmailAddress(address: $event->emailAddress, stream_id: $event->stream_id);
} else {
$driver->unsuppressEmailAddress(address: $event->emailAddress);
}
MailProvider::with(driver: $event->driver)

Check failure on line 12 in src/Listeners/UnsuppressEmailAddress.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to an undefined method Vormkracht10\Mails\Contracts\MailDriverContract::unsuppressEmailAddress().
->unsuppressEmailAddress(
address: $event->emailAddress,
stream_id: $event->stream_id ?? null
);
}
}

0 comments on commit d072b05

Please sign in to comment.