Hello @levlam
I noticed that TdApi.GetChat request returns the 400 Exception when I use the correct chatId.
I send such a request client.send(new TdApi.GetChat(chatId), defaultHandler); to get a chat by id (chatId is correct and exists) and it returns this exception:
Error {
code = 400
message = "Chat not found"
}
But when I send TdApi.SearchPublicChat request to make a search by username (the chatId owns this username) it works well. So after that, I send the same request to find a channel by chatId, and it returns chat information.
client.send(new TdApi.SearchPublicChat(username), defaultHandler); - get result
client.send(new TdApi.GetChat(chatId), defaultHandler); - works well
Or maybe it's expected behavior because I see it in TdApi.GetChat description.
Returns information about a chat by its identifier, this is an offline request if the current user is not a bot.
Maybe we should find a chat by name before making a search by id to upload the chat in the cache?
Hello @levlam I noticed that TdApi.GetChat request returns the
400
Exception when I use the correctchatId
.I send such a request
client.send(new TdApi.GetChat(chatId), defaultHandler);
to get a chat by id (chatId
is correct and exists) and it returns this exception:But when I send TdApi.SearchPublicChat request to make a search by username (the
chatId
owns this username) it works well. So after that, I send the same request to find a channel bychatId
, and it returns chat information.I can describe this issue easier:
client.send(new TdApi.GetChat(chatId), defaultHandler);
- errorclient.send(new TdApi.SearchPublicChat(username), defaultHandler);
- get resultclient.send(new TdApi.GetChat(chatId), defaultHandler);
- works wellOr maybe it's expected behavior because I see it in TdApi.GetChat description.