Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Types #459

Open
Galileon-venta opened this issue Mar 23, 2021 · 8 comments
Open

Custom Types #459

Galileon-venta opened this issue Mar 23, 2021 · 8 comments
Labels
bug Something isn't working no-stale

Comments

@Galileon-venta
Copy link

I'm using a Samsung Smartphone (German) to validate my data. It imports
telephone: [{value: '+49 12345678', param: {type: "cell"}}],
as other attribute -> cell.

I'd like to get my Smartphone to auto select "Mobiltelefon" (Mobiltelefon) as the correct one but I dont get the Interface here. I changed the local file to accept any String which works with my phone but is propably not intended.

Is there an Official way to do this?

@DanielHabenicht
Copy link
Owner

Can you show the file that is importing fine?

@Galileon-venta
Copy link
Author

File Content is as Follows:

BEGIN:VCARD VERSION:4.0 FN:Max Mustermann N:Mustermann;Max;;; GENDER:M TEL;TYPE=Mobil:+49123456789 EMAIL;TYPE=Geschäftlich:[email protected] TITLE:Beispiel END:VCARD

Tested with my Samsung S10 and an iPhone, both with newest update available installed.
iOS just ignores the Type because Apple does not specify more than that it is an e.g. E-Mail in its contacts app.

@Galileon-venta
Copy link
Author

UPDATE: I have done some more tests and think I have found a solution. The app recognizes e.g. 'HOME' as Zuhause but not 'home'. Is there something against writing all the keys in uppercase?

If not I'd submit this as a PR. Waiting for your feedback.

@DanielHabenicht
Copy link
Owner

DanielHabenicht commented Mar 24, 2021

Mhm, thats not what the RFC says. https://tools.ietf.org/html/rfc6350 (version 4)
It strictly has lowercase types.

If you want you can create a new type like NonCompliantVCard (or a better name) and overwrite it there.
Although just mapping it to a custom type on you side might be easier. (like you already did)

The type already can be overwritten by simply writing it in uppercase.

@Galileon-venta
Copy link
Author

Well...
I will contact Samsung then to get their feedback on this;

If you want, I can update this ticket when I get a response or we can just close it.

@DanielHabenicht
Copy link
Owner

I've just seen that there are some differences in the example for vCard 3 and vCard 4. So it might still be an issue.

@DanielHabenicht
Copy link
Owner

Nevermind, even the standard is not compliant :D
In VCard 3 they specify TYPE as

The type can include the type parameter "TYPE" to specify intended
   use for the telephone number. The TYPE parameter values can include:
   "home" to indicate a telephone number associated with a residence,
   "msg" to indicate the telephone number has voice messaging support,
   "work" to indicate a telephone number associated with a place of
   work, "pref" to indicate a preferred-use telephone number, "voice" to
   indicate a voice telephone number, "fax" to indicate a facsimile
   telephone number, "cell" to indicate a cellular telephone number,
   "video" to indicate a video conferencing telephone number, "pager" to
   indicate a paging device telephone number, "bbs" to indicate a
   bulletin board system telephone number, "modem" to indicate a MODEM
   connected telephone number, "car" to indicate a car-phone telephone
   number, "isdn" to indicate an ISDN service telephone number, "pcs" to
   indicate a personal communication services telephone number. The
   default type is "voice".

Just to use all of them in uppercase in their example...

Sure please update if they come back.

@DanielHabenicht
Copy link
Owner

If this is a common issue you might add an option to uppercase all types, but in general it seems like a bad idea, because it opens up the complexity. Hope the local overwrite from your site is sufficient.

@DanielHabenicht DanielHabenicht added no-stale bug Something isn't working labels Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-stale
Projects
None yet
Development

No branches or pull requests

2 participants