telegram api constructor · layer 229 · #b1b8cc83

user

Indicates info about a certain user.

definition

user#b1b8cc83 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true bot_business:flags2.11?true bot_has_main_app:flags2.13?true bot_forum_view:flags2.16?true bot_forum_can_manage_topics:flags2.17?true bot_can_manage_bots:flags2.18?true bot_guestchat:flags2.19?true bot_guard:flags2.20?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?RecentStory color:flags2.8?PeerColor profile_color:flags2.9?PeerColor bot_active_users:flags2.12?int bot_verification_icon:flags2.14?long send_paid_messages_stars:flags2.15?long linked_community_id:flags2.21?long = User;

parameters

nametypedescription
flags#Flags, see TL conditional fields
selfflags.10?trueWhether this user indicates the currently logged in user
contactflags.11?trueWhether this user is a contact When updating the local peer database, do not apply changes to this field if the min flag is set.
mutual_contactflags.12?trueWhether this user is a mutual contact. When updating the local peer database, do not apply changes to this field if the min flag is set.
deletedflags.13?trueWhether the account of this user was deleted. Changes to this flag should invalidate the local userFull cache for this user ID, see here » for more info.
botflags.14?trueIs this user a bot? Changes to this flag should invalidate the local userFull cache for this user ID, see here » for more info.
bot_chat_historyflags.15?trueCan the bot see all messages in groups?
bot_nochatsflags.16?trueCan the bot be added to groups?
verifiedflags.17?trueWhether this user is verified
restrictedflags.18?trueAccess to this user must be restricted for the reason specified in restriction_reason
minflags.20?trueSee min
bot_inline_geoflags.21?trueWhether the bot can request our geolocation in inline mode
supportflags.23?trueWhether this is an official support user
scamflags.24?trueThis may be a scam user
apply_min_photoflags.25?trueIf set and min is set, the value of photo can be used to update the local database, see the documentation of that flag for more info.
fakeflags.26?trueIf set, this user was reported by many users as a fake or scam user: be careful when interacting with them.
bot_attach_menuflags.27?trueWhether this bot offers an attachment menu web app
premiumflags.28?trueWhether this user is a Telegram Premium user Changes to this flag should invalidate the local userFull cache for this user ID, see here » for more info. Changes to this flag if the self flag is set should also trigger the following calls, to refresh the respective caches: - The help.getConfig cache - The messages.getTopReactions cache if the bot flag is not set
attach_menu_enabledflags.29?trueWhether we installed the attachment menu web app offered by this bot. When updating the local peer database, do not apply changes to this field if the min flag is set.
flags2#Flags, see TL conditional fields
bot_can_editflags2.1?trueWhether we can edit the profile picture, name, about text and description of this bot because we own it. When updating the local peer database, do not apply changes to this field if the min flag is set. Changes to this flag (if min is not set) should invalidate the local userFull cache for this user ID.
close_friendflags2.2?trueWhether we marked this user as a close friend, see here » for more info. When updating the local peer database, do not apply changes to this field if the min flag is set.
stories_hiddenflags2.3?trueWhether we have hidden » all active stories of this user. When updating the local peer database, do not apply changes to this field if the min flag is set.
stories_unavailableflags2.4?trueNo stories from this user are visible.
contact_require_premiumflags2.10?trueSee here for more info on this flag ».
bot_businessflags2.11?trueWhether this bot can be connected to a user as specified here ».
bot_has_main_appflags2.13?trueIf set, this bot has configured a Main Mini App ».
bot_forum_viewflags2.16?true
bot_forum_can_manage_topicsflags2.17?true
bot_can_manage_botsflags2.18?true
bot_guestchatflags2.19?true
bot_guardflags2.20?true
idlongID of the user, see here » for more info and the available ID range.
access_hashflags.0?longAccess hash of the user, see here » for more info. If this flag is set, when updating the local peer database, generate a virtual flag called min_access_hash, which is: - Set to true if min is set AND -- The phone flag is not set OR -- The phone flag is set and the associated phone number string is non-empty - Set to false otherwise. Then, apply both access_hash and min_access_hash to the local database if: - min_access_hash is false OR - min_access_hash is true AND -- There is no locally cached object for this user OR -- There is no access_hash in the local cache OR -- The cached object's min_access_hash is also true If the final merged object stored to the database has the min_access_hash field set to true, the related access_hash is only suitable to use in inputPeerPhotoFileLocation », to directly download the profile pictures of users, everywhere else a inputPeer*FromMessage constructor will have to be generated as specified here ». Bots can also use min access hashes in some conditions, by passing 0 instead of the min access hash.
first_nameflags.1?stringFirst name. When updating the local peer database, apply changes to this field only if: - The min flag is not set OR - The min flag is set AND -- The min flag of the locally cached user entry is set.
last_nameflags.2?stringLast name. When updating the local peer database, apply changes to this field only if: - The min flag is not set OR - The min flag is set AND -- The min flag of the locally cached user entry is set.
usernameflags.3?stringMain active username. When updating the local peer database, apply changes to this field only if: - The min flag is not set OR - The min flag is set AND -- The min flag of the locally cached user entry is set. Changes to this flag should invalidate the local userFull cache for this user ID if the above conditions are respected and the bot_can_edit flag is also set.
phoneflags.4?stringPhone number. When updating the local peer database, apply changes to this field only if: - The min flag is not set OR - The min flag is set AND -- The min flag of the locally cached user entry is set.
photoflags.5?UserProfilePhotoProfile picture of user. When updating the local peer database, apply changes to this field only if: - The min flag is not set OR - The min flag is set AND -- The apply_min_photo flag is set OR -- The min flag of the locally cached user entry is set.
statusflags.6?UserStatusOnline status of user. When updating the local peer database, apply changes to this field only if: - The min flag is not set OR - The min flag is set AND -- The min flag of the locally cached user entry is set OR -- The locally cached user entry is equal to userStatusEmpty.
bot_info_versionflags.14?intVersion of the bot_info field in userFull, incremented every time it changes. Changes to this flag should invalidate the local userFull cache for this user ID, see here » for more info.
restriction_reasonflags.18?Vector<RestrictionReason>Contains the reason why access to this user must be restricted.
bot_inline_placeholderflags.19?stringInline placeholder for this inline bot
lang_codeflags.22?stringLanguage code of the user
emoji_statusflags.30?EmojiStatusEmoji status
usernamesflags2.0?Vector<Username>Additional usernames. When updating the local peer database, apply changes to this field only if: - The min flag is not set OR - The min flag is set AND -- The min flag of the locally cached user entry is set. Changes to this flag (if the above conditions are respected) should invalidate the local userFull cache for this user ID.
stories_max_idflags2.5?RecentStoryID of the maximum read story. When updating the local peer database, do not apply changes to this field if the min flag of the incoming constructor is set.
colorflags2.8?PeerColorThe user's accent color.
profile_colorflags2.9?PeerColorThe user's profile color.
bot_active_usersflags2.12?intMonthly Active Users (MAU) of this bot (may be absent for small bots).
bot_verification_iconflags2.14?longDescribes a bot verification icon ».
send_paid_messages_starsflags2.15?longIf set, the user has enabled paid messages », we might need to pay the specified amount of Stars to send them messages, depending on the configured exceptions: check userFull.send_paid_messages_stars or users.getRequirementsToContact to see if the currently logged in user actually has to pay or not, see here » for the full flow.
linked_community_idflags2.21?long

type

User · other constructors: userEmpty

history

present in layers 46–229 · constructor id changed 13×

idlayers
#d10d979a46–65
#2e13f4c366–104
#938458c1105–132
#3ff6ecb0133–144
#5d99adee145–147
#8f97c628148–159
#abb5f120160–165
#eb602f25166
#215c4438167–184
#83314fca185–195
#4b46c37e196–199
#020b1422200–216
#31774388217–227
#b1b8cc83228–229