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:
@@ -20,7 +20,10 @@ class NotifyTelegramAboutPersonaliaClick implements ShouldQueue
|
||||
|
||||
protected ?string $userAgent;
|
||||
|
||||
public function __construct(Personalia $personalia, ?string $ip, ?string $userAgent)
|
||||
/**
|
||||
* @param array<string, string|null> $ipHeaders
|
||||
*/
|
||||
public function __construct(Personalia $personalia, ?string $ip, ?string $userAgent, protected array $ipHeaders = [])
|
||||
{
|
||||
$this->personalia = $personalia;
|
||||
$this->ip = $ip;
|
||||
@@ -29,6 +32,6 @@ class NotifyTelegramAboutPersonaliaClick implements ShouldQueue
|
||||
|
||||
public function handle(TelegramNotificationService $telegram): void
|
||||
{
|
||||
$telegram->notifyPersonaliaClick($this->personalia, $this->ip, $this->userAgent);
|
||||
$telegram->notifyPersonaliaClick($this->personalia, $this->ip, $this->userAgent, $this->ipHeaders);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user