userContact

A user that is a contact of the current authorized user.

Constructor schema is available as of layer 18. Switch »

Parameters

Name Type Description
id int User identifier
first_name string First name (see below)
last_name string Last name (see below)
access_hash long Checksum, dependant on user ID
phone string Phone number
photo UserProfilePhoto Profile photo
status UserStatus Current status
username string Username
Parameter added in Layer 18.

Type

User

Displaying the user's name

The first_name and last_name fields are assigned by the server as follows:

  1. If the user id is in the current user's phone Contacts and the name for this contact was imported along with the contact, then that name will be used.
  2. If the user id has the current user in his Contacts, then the fields first_name, last_name will contain the name the user id supplied.
  3. If none of the conditions 1,2 are observed, both fields are returned empty.