Skip to content

peerSettings

Back to constructors index

List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat action bar », see here » for more info.

Attributes:

NameTypeRequiredDescription
report_spamBoolOptionalWhether we can still report the user for spam
add_contactBoolOptionalWhether we can add the user as contact
block_contactBoolOptionalWhether we can block the user
share_contactBoolOptionalWhether we can share the user’s contact
need_contacts_exceptionBoolOptionalWhether a special exception for contacts is needed
report_geoBoolOptionalWhether we can report a geogroup as irrelevant for this location
autoarchivedBoolOptionalWhether this peer was automatically archived according to privacy settings and can be unarchived
invite_membersBoolOptionalIf set, this is a recently created group chat to which new members can be invited
request_chat_broadcastBoolOptionalThis flag is set if request_chat_title and request_chat_date fields are set and the join request » is related to a channel (otherwise if only the request fields are set, the join request » is related to a chat).
business_bot_pausedBoolOptionalThis flag is set if both business_bot_id and business_bot_manage_url are set and all connected business bots » were paused in this chat using account.toggleConnectedBotPaused ».
business_bot_can_replyBoolOptionalThis flag is set if both business_bot_id and business_bot_manage_url are set and connected business bots » can reply to messages in this chat, as specified by the settings during initial configuration.
geo_distanceintOptionalDistance in meters between us and this peer
request_chat_titlestringOptionalIf set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the chat/channel’s title.
request_chat_dateintOptionalIf set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the timestamp when the join request » was sent.
business_bot_idlongOptionalContains the ID of the business bot » managing this chat, used to display info about the bot in the action bar.
business_bot_manage_urlstringOptionalContains a deep link », used to open a management menu in the business bot. This flag is set if and only if business_bot_id is set.
charge_paid_message_starslongOptionalAll users that must pay us » to send us private messages will have this flag set only for us, containing the amount of required stars, see here » for more info on paid messages.
registration_monthstringOptionalUsed to display the user’s registration year and month, the string is in MM.YYYY format, where MM is the registration month (1-12), and YYYY is the registration year.
phone_countrystringOptionalThe country code of the user’s phone number.
name_change_dateintOptionalWhen was the user’s name last changed.
photo_change_dateintOptionalWhen was the user’s photo last changed.

Type: PeerSettings

Example:

$peerSettings = ['_' => 'peerSettings', 'report_spam' => Bool, 'add_contact' => Bool, 'block_contact' => Bool, 'share_contact' => Bool, 'need_contacts_exception' => Bool, 'report_geo' => Bool, 'autoarchived' => Bool, 'invite_members' => Bool, 'request_chat_broadcast' => Bool, 'business_bot_paused' => Bool, 'business_bot_can_reply' => Bool, 'geo_distance' => int, 'request_chat_title' => 'string', 'request_chat_date' => int, 'business_bot_id' => long, 'business_bot_manage_url' => 'string', 'charge_paid_message_stars' => long, 'registration_month' => 'string', 'phone_country' => 'string', 'name_change_date' => int, 'photo_change_date' => int];