cozy / cozy-contacts-v2

Contact books manager for Cozy
http://cozy.io
GNU Affero General Public License v3.0
20 stars 20 forks source link

Add mediatype to datapoint #245

Closed Ljinod closed 8 years ago

Ljinod commented 8 years ago

This step is the first in enabling the sharing of files between Cozy instances: we need a reliable way - on the server side - to extract the url of a Cozy cloud from a contact.

The solution we chose was to add a mediatype to the datapoint structure: we can interpret an url according to the value of its mediatype. For instance if the mediatype is 'cloud:cozy' we know that the url represents the address of a Cozy instance and if the mediatype is empty it's simply an email address.

This solution has the advantages of still being compliant to the vCard RFC and, normally, being transparent.

m4dz commented 8 years ago

Thanks for you contribution @Ljinod!

It seems to be ok for me, can you just remove your build form your commits, as long as we don't commit builds into the development branch anymore? Thanks!

Ljinod commented 8 years ago

Thanks for your feedback @m4dz!

I've removed the build from my commits as well as helpers.jade - where I had just added two blank lines.

m4dz commented 8 years ago

Thanks a lot :+1:!