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
### Removed
### Fixed
- Don't output deprecation notices if no logging is enabled.
- Respect custom HTTP Client initialisation, no matter when it is set.
### Security
## [0.59.0] - 2019-07-07
......
......@@ -264,7 +264,7 @@ class Request
}
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