Skip to content

Custom client being reset after Telegram initialisation #985

Closed
@noplanman

Description

@noplanman

Bug Report

Required Information

? !
PHP Telegram Bot version 0.59.0

Summary

When setting a custom client via Request::setClient(...) before initialising the Telegram object, it gets overwritten.

Current behaviour

Custom client get overwritten.

How to reproduce

// Set custom client.
Request::setClient(new GuzzleHttp\Client([
    'base_uri' => 'https://api.telegram.org',
    'proxy'    => $proxy_url,
]));
// Create Telegram API object.
$telegram = new Telegram($bot_api_key, $bot_username);

Expected behaviour

Custom client should be remembered.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions