Closed littleboyonearth closed 3 months ago
what I know: if local db not init, or the first launch, then getChat
has to happen before sendMsg
.
so after succeeding authentication, I tried to loadChat
, which had no effect, without any related response received, so I tried to getChatById
, which just resulted in the 400 error as above showed.
You must receive the chat from TDLib first before you can use its identifier. You can do this in exactly the same way you would do from a GUI app.
after adjusting the log level, I see what happens. it's a net proxy problem. when logLevel set to 0, there is no any related logs output. Thank you for support!
I set proxy during sometime before, and later, I comment the setting lines
client.send(new TdApi.AddProxy(proxyServer, proxyPort, true, new TdApi.ProxyTypeSocks5()), null);
and relaunch, I thought that will not bypass proxy, but the logs suggests that TDLib remember
the proxy setting before and use it even later I don't set.
this behavior is just like an app(even though you run the program just like a command line ), set and remember, and must disableProxy
explicitly if you don't want a proxy.
Hope this will help someone.
before sendMsg, I tried
but just get
this error is caused by the last line,
getChatById
.and after sendMsg, same response received.
pls help.