Object defines a user.
userEmpty#200250ba id:int = User;
userSelf#7007b451 id:int first_name:string last_name:string username:string phone:string photo:UserProfilePhoto status:UserStatus inactive:Bool = User;
userContact#cab35e18 id:int first_name:string last_name:string username:string access_hash:long phone:string photo:UserProfilePhoto status:UserStatus = User;
userRequest#d9ccc4ef id:int first_name:string last_name:string username:string access_hash:long phone:string photo:UserProfilePhoto status:UserStatus = User;
userForeign#75cf7a8 id:int first_name:string last_name:string username:string access_hash:long photo:UserProfilePhoto status:UserStatus = User;
userDeleted#d6016d7a id:int first_name:string last_name:string username:string = User;
---functions---
account.updateProfile#f0888d68 first_name:string last_name:string = User;
account.updateUsername#3e0bdd7c username:string = User;
Constructor | Description |
---|---|
userEmpty | Empty constructor, non-existent user. |
user | Indicates info about a certain user. Unless specified otherwise, when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor). See here ยป for an implementation of the logic to use when updating the local user peer database. |
Method | Description |
---|---|
account.updateProfile | Updates user profile. |
account.updateUsername | Changes username for the current user. |
account.changePhone | Change the phone number of the current account |
contacts.importContactToken | Obtain user info from a temporary profile link. |