I am trying to use telegram database library for java (tdlib or tdapi) but when i get chatId
of a channel by SearchPublicChat
and try to get messages or view messages i get an error.
Error{code=6 message= Chat not found}
I can not understand why the chatId
i receive above why when i pass it to another method i get that error
Please help me about that problem and that library.
Thank you.
Before requesting chat by id the TdLib must know about this chat in current session. You need search this chat by @mention_link if it public, or getting whole your chat list. Also, the library will be know about chat if some action happens with this chat (like new message from chat, chat updated...)
And this applies also to messages, users and etc. You can request it by id only when TdLib know about this entity.