nextcloud / contacts

📇 Contacts app for Nextcloud
https://apps.nextcloud.com/apps/contacts
GNU Affero General Public License v3.0
571 stars 172 forks source link

Do not suggest props that are not compatible with the version of the vcard #631

Open skjnldsv opened 6 years ago

skjnldsv commented 6 years ago

On the add new property, we should not allow the addition of properties that are not allowed on the vcard rfc.

There is an issue regarding the allowed data on the ical.js: https://github.com/mozilla-comm/ical.js/issues/363

https://github.com/mozilla-comm/ical.js/blob/d26b19fa5adb4d3d6e03bff6c6e4c0705c12ab11/lib/ical/design.js#L873

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/63535155-do-not-suggest-props-that-are-not-compatible-with-the-version-of-the-vcard?utm_campaign=plugin&utm_content=tracker%2F46751899&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F46751899&utm_medium=issues&utm_source=github).
spoorun commented 5 years ago

The issue here one can see is that when a User creates a new contact through the app, it appears to be automatically created as vCard 3 rather than vCard 4, with no option to force vCard 4. For those Users wishing to sync with vCard 4 services, this is problematic.

skjnldsv commented 5 years ago

@olantrust We're creating vcard4 by default :) https://github.com/nextcloud/contacts/blob/6a9025c57dfd738d3d25651853bc38e15db90f1c/src/views/Contacts.vue#L310-L318

spoorun commented 5 years ago

@olantrust We're creating vcard4 by default :)

contacts/src/views/Contacts.vue

Lines 310 to 318 in 6a9025c async newContact() { const rev = new VCardTime() const contact = new Contact( BEGIN:VCARD VERSION:4.0 PRODID:-//Nextcloud Contacts v${appVersion} END:VCARD .trim().replace(/\t/gm, ''), this.defaultAddressbook)

OK, just each card that I download from new contacts created in Contacts App v 3.10 are specified as VCARD Version 3.0.

skjnldsv commented 5 years ago

@olantrust this is a server issue I guess then! :thinking: EDIT: https://github.com/nextcloud/contacts/issues/4038