Td Api Update User - OTR/Kotlin-Telegram-Client GitHub Wiki
TdApi.UpdateUser
Class Description
Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the client. This update is sent whenever the user profile information is updated.
Property
user
: TdApi.User - New data about the user.
Example
// Assume 'update' is an instance of UpdateUser
if (update.isSelf) {
// Update about the current user
val user = update.user
// Do something with the updated user information
} else {
// Update about another user
val user = update.user
// Do something with the updated user information
}
In this example, we use an if statement to check whether the UpdateUser is about the current user or another user. If it's about the current user, we retrieve the updated user information using the user field of the UpdateUser object. Otherwise, we retrieve the updated user information and do something with it.