Use existing HTTP client on Telegram initialisation if it has already been set.

parent 89f22c27
...@@ -13,6 +13,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c ...@@ -13,6 +13,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
### Removed ### Removed
### Fixed ### Fixed
- Don't output deprecation notices if no logging is enabled. - Don't output deprecation notices if no logging is enabled.
- Respect custom HTTP Client initialisation, no matter when it is set.
### Security ### Security
## [0.59.0] - 2019-07-07 ## [0.59.0] - 2019-07-07
......
...@@ -264,7 +264,7 @@ class Request ...@@ -264,7 +264,7 @@ class Request
} }
self::$telegram = $telegram; self::$telegram = $telegram;
self::setClient(new Client(['base_uri' => self::$api_base_uri])); self::setClient(self::$client ?: new Client(['base_uri' => self::$api_base_uri]));
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment