Skip to content

Commit

Permalink
Merge branch 'main' into guibranco-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
guibranco authored Aug 22, 2024
2 parents 7624678 + 51a917f commit 86e212b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/OneSignal.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public function __construct($token, $logger = null, $customUserAgent = null, $cu
{
$this->request = new Request();
$this->logger = $logger;
$userAgentHeader = "User-Agent: Pancake/1.0 (+https://github.com/guibranco/pancake)";
if ($customUserAgent != null) {
$userAgentHeader = "User-Agent: $customUserAgent";
}
$this->headers = [$userAgentHeader, "Content-Type: application/json; charset=utf-8", "Authorization: Basic " . $token];
$this->headers = array(
"User-Agent: " . ($customUserAgent ?? "Pancake/0.8 (+https://github.com/guibranco/pancake)"),
"Content-Type: application/json; charset=utf-8",
"Authorization: Basic " . $token
);
$this->endpoint = $customEndpoint ?? self::BASE_URL;
}

Expand Down

0 comments on commit 86e212b

Please sign in to comment.