AddContact

public struct AddContact : Codable, Equatable, TDFunction

Adds a user to the contact list or edits an existing contact by their user identifier

  • Undocumented

    Declaration

    Swift

    public typealias Result = Ok
  • The contact to add or edit; phone number can be empty and needs to be specified only if known, vCard is ignored

    Declaration

    Swift

    public let contact: Contact
  • True, if the new contact needs to be allowed to see current user’s phone number. A corresponding rule to userPrivacySettingShowPhoneNumber 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

    Declaration

    Swift

    public let sharePhoneNumber: Bool
  • Adds a user to the contact list or edits an existing contact by their user identifier

    Declaration

    Swift

    public init(contact: Contact, sharePhoneNumber: Bool)

    Parameters

    contact

    The contact to add or edit; phone number can be empty and needs to be specified only if known, vCard is ignored

    sharePhoneNumber

    True, if the new contact needs to be allowed to see current user’s phone number. A corresponding rule to userPrivacySettingShowPhoneNumber 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