Skip to content

Conversation

RichardGL11
Copy link
Collaborator

Still in progress, just publishing to show improvements

Comment on lines 21 to 27
foreach ($headers as $header) {

if ($header['name'] == config('filament-better-mails.mails.headers.key')) {
$mailUuid = $header['value'];
break;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
foreach ($headers as $header) {
if ($header['name'] == config('filament-better-mails.mails.headers.key')) {
$mailUuid = $header['value'];
break;
}
}
foreach ($headers as $header) {
if ($this->validateHeaderKey($header['name']) {
$mailUuid = $header['value'];
break;
}
}


namespace Basement\BetterMails\Core\Contracts;

interface BetterDTOContract
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
interface BetterDTOContract
interface BetterMailDTOContract

$mailUuid = $dto['data']['headers'][0]['value'] ?? $dto['mailUuid'];

return new self(
mailUuid: $mailUuid,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Ramsey\Uuid\Uuid::fromString();

use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

final class ResendEmailComplainedEvent implements COmplainedEventContract
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ComplainedEventContract


foreach ($headers as $header) {

if ($header[$headerKey] == config('filament-better-mails.mails.headers.key')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ($header[$headerKey] == config('filament-better-mails.mails.headers.key')) {
if ($header[$headerKey] == strtolower(config('filament-better-mails.mails.headers.key'))) {

would be cool to parse the key from the request and ours to lowercase.

i had a really bad time when i forgot this, so i assume that would be a better thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants