List of all members | Public Fields | Public Instance Methods | Static Public Attributes
user Class Referencefinal

Inherits Object.

Description

Represents a user.

Public Fields

int53 id_
 User identifier.
 
string first_name_
 First name of the user.
 
string last_name_
 Last name of the user.
 
object_ptr< usernamesusernames_
 Usernames of the user; may be null.
 
string phone_number_
 Phone number of the user.
 
object_ptr< UserStatusstatus_
 Current online status of the user.
 
object_ptr< profilePhotoprofile_photo_
 Profile photo of the user; may be null.
 
int32 accent_color_id_
 Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview. For Telegram Premium users only.
 
int64 background_custom_emoji_id_
 Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. For Telegram Premium users only.
 
int32 profile_accent_color_id_
 Identifier of the accent color for the user's profile; -1 if none. For Telegram Premium users only.
 
int64 profile_background_custom_emoji_id_
 Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none. For Telegram Premium users only.
 
object_ptr< emojiStatusemoji_status_
 Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only.
 
bool is_contact_
 The user is a contact of the current user.
 
bool is_mutual_contact_
 The user is a contact of the current user and the current user is a contact of the user.
 
bool is_close_friend_
 The user is a close friend of the current user; implies that the user is a contact.
 
bool is_verified_
 True, if the user is verified.
 
bool is_premium_
 True, if the user is a Telegram Premium user.
 
bool is_support_
 True, if the user is Telegram support account.
 
string restriction_reason_
 If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
 
bool is_scam_
 True, if many users reported this user as a scam.
 
bool is_fake_
 True, if many users reported this user as a fake account.
 
bool has_active_stories_
 True, if the user has non-expired stories available to the current user.
 
bool has_unread_active_stories_
 True, if the user has unread non-expired stories available to the current user.
 
bool restricts_new_chats_
 True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them.
 
bool have_access_
 If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method.
 
object_ptr< UserTypetype_
 Type of the user.
 
string language_code_
 IETF language tag of the user's language; only available to bots.
 
bool added_to_attachment_menu_
 True, if the user added the current bot to attachment menu; only available to bots.
 

Public Instance Methods

 user ()
 
 user (int53 id_, string const &first_name_, string const &last_name_, object_ptr< usernames > &&usernames_, string const &phone_number_, object_ptr< UserStatus > &&status_, object_ptr< profilePhoto > &&profile_photo_, int32 accent_color_id_, int64 background_custom_emoji_id_, int32 profile_accent_color_id_, int64 profile_background_custom_emoji_id_, object_ptr< emojiStatus > &&emoji_status_, bool is_contact_, bool is_mutual_contact_, bool is_close_friend_, bool is_verified_, bool is_premium_, bool is_support_, string const &restriction_reason_, bool is_scam_, bool is_fake_, bool has_active_stories_, bool has_unread_active_stories_, bool restricts_new_chats_, bool have_access_, object_ptr< UserType > &&type_, string const &language_code_, bool added_to_attachment_menu_)
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Instance Methods inherited from TlObject
virtual void store (TlStorerUnsafe &s) const
 
virtual void store (TlStorerCalcLength &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
TlObjectoperator= (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
TlObjectoperator= (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Static Public Attributes

static const std::int32_t ID = 408235106
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ user() [1/2]

user ( )

Represents a user.

◆ user() [2/2]

user ( int53  id_,
string const &  first_name_,
string const &  last_name_,
object_ptr< usernames > &&  usernames_,
string const &  phone_number_,
object_ptr< UserStatus > &&  status_,
object_ptr< profilePhoto > &&  profile_photo_,
int32  accent_color_id_,
int64  background_custom_emoji_id_,
int32  profile_accent_color_id_,
int64  profile_background_custom_emoji_id_,
object_ptr< emojiStatus > &&  emoji_status_,
bool  is_contact_,
bool  is_mutual_contact_,
bool  is_close_friend_,
bool  is_verified_,
bool  is_premium_,
bool  is_support_,
string const &  restriction_reason_,
bool  is_scam_,
bool  is_fake_,
bool  has_active_stories_,
bool  has_unread_active_stories_,
bool  restricts_new_chats_,
bool  have_access_,
object_ptr< UserType > &&  type_,
string const &  language_code_,
bool  added_to_attachment_menu_ 
)

Represents a user.

Parameters
[in]id_User identifier.
[in]first_name_First name of the user.
[in]last_name_Last name of the user.
[in]usernames_Usernames of the user; may be null.
[in]phone_number_Phone number of the user.
[in]status_Current online status of the user.
[in]profile_photo_Profile photo of the user; may be null.
[in]accent_color_id_Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview. For Telegram Premium users only.
[in]background_custom_emoji_id_Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. For Telegram Premium users only.
[in]profile_accent_color_id_Identifier of the accent color for the user's profile; -1 if none. For Telegram Premium users only.
[in]profile_background_custom_emoji_id_Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none. For Telegram Premium users only.
[in]emoji_status_Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only.
[in]is_contact_The user is a contact of the current user.
[in]is_mutual_contact_The user is a contact of the current user and the current user is a contact of the user.
[in]is_close_friend_The user is a close friend of the current user; implies that the user is a contact.
[in]is_verified_True, if the user is verified.
[in]is_premium_True, if the user is a Telegram Premium user.
[in]is_support_True, if the user is Telegram support account.
[in]restriction_reason_If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
[in]is_scam_True, if many users reported this user as a scam.
[in]is_fake_True, if many users reported this user as a fake account.
[in]has_active_stories_True, if the user has non-expired stories available to the current user.
[in]has_unread_active_stories_True, if the user has unread non-expired stories available to the current user.
[in]restricts_new_chats_True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them.
[in]have_access_If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method.
[in]type_Type of the user.
[in]language_code_IETF language tag of the user's language; only available to bots.
[in]added_to_attachment_menu_True, if the user added the current bot to attachment menu; only available to bots.

Method Documentation

◆ store()

void store ( TlStorerToString &  s,
const char *  field_name 
) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


The documentation for this class was generated from the following file: