// getAddgetAddressBookContactsFromContentHub gets the phone contacts via the content hub func getAddressBookContactsFromContentHub() ([]textsecure.Contact, error) { if exists(contactsFile) && vcardPath == "" { return textsecure.ReadContacts(contactsFile) } vcardPath := strings.TrimPrefix(vcardPath, "file://") contacts, err := getContactsFromVCardFile(vcardPath) if err != nil { return nil, err } err = textsecure.WriteContacts(contactsFile, contacts) if err != nil { return nil, err } return contacts, nil }
func getLocalContacts() ([]textsecure.Contact, error) { return textsecure.ReadContacts(configDir + "/contacts.yml") }
// getDesktopContacts reads the contacts for the desktop app from a file func getDesktopContacts() ([]textsecure.Contact, error) { return textsecure.ReadContacts(filepath.Join(configDir, "contacts.yml")) }
// get contacts file, pass to the ts library func getLocalContacts() ([]ts.Contact, error) { return ts.ReadContacts(".config/contacts.yml") }