Usually obtaining a user looks like this:
user = client.get_input_entity (user.id)
or so:
Full_user = Await Client (Getfulluserrequest (User.id))
But when receiving data on the user in telegram in such ways, I get some data about it from the saved contact. For example, if I get the name full_user.users [0] .first_name
or the surname full_user.users [0] .last_name
, then I receive the data that I myself retained about the user in my contact of the sheet.
How to get the name first_name
and the surname last_name
originally set by the user himself?
You can't, It's Telegram behavior, Any name set for the contact at the time of saving them as one overrides their "original" name they had in every encounter of their User object, mainly for consistency of their apps. Deleting them from contacts is needed to see it once again.
You can find references in official repository issues like TDLib or tickets at their suggestions platform requesting this behavior change.