Add proxy IP headers to Telegram notifications
All checks were successful
Tests / Laravel tests (pull_request) Successful in 12m3s
All checks were successful
Tests / Laravel tests (pull_request) Successful in 12m3s
This commit is contained in:
@@ -25,8 +25,18 @@ class NotifyTelegramAboutContactMessage implements ShouldQueue
|
||||
|
||||
protected ?string $phone;
|
||||
|
||||
public function __construct(string $name, string $message, string $ip, string $userAgent, ?string $email = null, ?string $phone = null)
|
||||
{
|
||||
/**
|
||||
* @param array<string, string|null> $ipHeaders
|
||||
*/
|
||||
public function __construct(
|
||||
string $name,
|
||||
string $message,
|
||||
string $ip,
|
||||
string $userAgent,
|
||||
?string $email = null,
|
||||
?string $phone = null,
|
||||
protected array $ipHeaders = []
|
||||
) {
|
||||
$this->name = $name;
|
||||
$this->message = $message;
|
||||
$this->ip = $ip;
|
||||
@@ -43,7 +53,8 @@ class NotifyTelegramAboutContactMessage implements ShouldQueue
|
||||
$this->ip,
|
||||
$this->userAgent,
|
||||
$this->email,
|
||||
$this->phone
|
||||
$this->phone,
|
||||
$this->ipHeaders
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user