fix Bug 61712
This commit is contained in:
parent
6a2b6fc46c
commit
d1213f7b04
@ -172,10 +172,15 @@ public class TelegramHelper
|
||||
|
||||
public TelegramBotClient InitClient(string token, string proxy)
|
||||
{
|
||||
if (string.IsNullOrEmpty(proxy))
|
||||
{
|
||||
return new TelegramBotClient(token);
|
||||
}
|
||||
|
||||
var httpClient = _httpClientFactory.CreateClient();
|
||||
|
||||
httpClient.BaseAddress = new Uri(proxy);
|
||||
|
||||
return string.IsNullOrEmpty(proxy) ? new TelegramBotClient(token) : new TelegramBotClient(token, httpClient);
|
||||
return new TelegramBotClient(token, httpClient);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user