I am going through XX-7304 [1] and I noticed that when we import contacts from 
Gmail, we add it to the database (phonebook_file_entry table) without checking 
for duplicate entries. This means that if you import your contacts from an 
account multiple times, it will create multiple duplicate entries of the same 
set of contacts in your database. 

Gmail assigns an unique resource id to each contact entry resource 
(ContactEntry.getId). At the minimum, we should store this id in the table, and 
use it to determine whether to add a particular entry to the table or update an 
existing entry. Ideally, we should store the versionId 
(ContactEntry.getVersionId) as well, and update existing entries only when the 
versionId has changed.

Comments?

Arjun

[1] http://track.sipfoundry.org/browse/XX-7304 -- Uploading gmail contacts from 
user portal
_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to