Closed 1Dradon1 closed 1 year ago
It is not possible to get a user or a chat by its identifier. You can only use user and chat identifiers that were received from TDLib, which makes the methods getUser
and getChat
useless for regular users.
Is there any way I can get full information about each chat user?
You can get some chat members with getBasicGroupFullInfo
or getSupergroupMembers
depending on type of the chat.
yes, I already use getBasicGroupFullInfo
to get the users ids, but then I want to get FirstName and LastName
how do i do that?
i figured out i need to use getUser
In this case I am facing the above problem
No, you need to handle updateUser
updates and have all the data always available. See https://core.telegram.org/tdlib/getting-started for more details.
Got it, thanks
I want to use getChat before getUser, because otherwise getUser returns "user not found". But I found out that without a 5 second delay after calling getChat, getUser still returns "user not found" It seems to me that this happens because TdLib doesn't have time to write cache about chat to internal storage, if this is so, how can I make sure to wait for cache writing to internal storage. If I'm wrong, what's the problem and how to solve it? await doesn't help...