lib/tdlib/client_methods.rb
# Adds a user to the contact list or edits an existing contact by their user identifier.
#
# @param contact [TD::Types::Contact, nil] The contact to add or edit; phone number can be empty and needs to be
#   specified only if known, vCard is ignored.
# @param share_phone_number [Boolean] True, if the new contact needs to be allowed to see current user's phone
#   number.
#   A corresponding rule to {TD::Types::UserPrivacySetting::ShowPhoneNumber} will be added if needed.
#   Use the field userFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be
#   asked to share their phone number.
# @return [TD::Types::Ok]
Adds a user to the contact list or edits an existing contact by their user identifier.
Adds a user to the contact list or edits an existing contact by their user identifier .
def add_contact(contact: nil, share_phone_number:)
    broadcast('@type'              => 'addContact',
              'contact'            => contact,
              'share_phone_number' => share_phone_number)
  end
def add_contact ( contact : nil , share_phone_number : ) broadcast ( '@type' => 'addContact' , 'contact' => contact , 'share_phone_number' => share_phone_number ) end
Adds a user to the contact list or edits an existing contact by their user identifier.
Adds a user to the contact list or edits an existing contact by their user identifier .
None
TD::Types::Ok
contact
The contact to add or edit; phone number can be empty and needs to be specified only if known, vCard is ignored.
The contact to add or edit ; phone number can be empty and needs to be specified only if known vCard is ignored .
share_phone_number
True, if the new contact needs to be allowed to see current user's phone number. A corresponding rule to {TD::Types::UserPrivacySetting::ShowPhoneNumber} will be added if needed. Use the field userFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number.
True if the new contact needs to be allowed to see current user ' s phone number . A corresponding rule to { TD :: Types :: UserPrivacySetting :: ShowPhoneNumber } will be added if needed . Use the field userFullInfo . need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number .