Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(ContactUtils.isContactExisting(fullName) === true) {
- //Commented out update
- /*Logger.debug("[Connection] Person exist on contacts");
- //update contact
- ContactUtils.updateContact({
- firstName: profiles[i].firstName,
- lastName: profiles[i].lastName,
- fullName: fullName,
- image: profilePic.read(),
- jobTitle: profiles[i].jobTitle,
- phoneNumber: numbers[0],
- workNumber: numbers[1] ? numbers[1] : "",
- homeNumber: numbers[2] ? numbers[2] : "",
- emailAddress: profiles[i].emails,
- homeAddress: profiles[i].homeAddress,
- workAddress: profiles[i].workAddress,
- skype: profiles[i].skype,
- twitter: profiles[i].twitter,
- url: profiles[i].website,
- company: profiles[i].company,
- notes: profiles[i].notes
- });
- Logger.debug("[Connection] Successfully updated on address book.");
- isAddressBookUpdated = true;
- */
- }
- else {
- Logger.debug("[Connection] Person doesn't exist on contacts. Creating a new one");
- //create new contact
- ContactUtils.createContact({
- firstName: profiles[i].firstName,
- lastName: profiles[i].lastName,
- fullName: fullName,
- image: profilePic.read(),
- phoneNumber: numbers[i],
- workNumber: numbers[1] ? numbers[1] : "",
- homeNumber: numbers[2] ? numbers[2] : "",
- emailAddress: profiles[i].emails,
- homeAddress: profiles[i].homeAddress,
- workAddress: profiles[i].workAddress,
- skype: profiles[i].skype,
- twitter: profiles[i].twitter,
- url: profiles[i].website,
- company: profiles[i].company,
- notes: profiles[i].notes
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement