VCardProvider should consider some elements as optional

Description

Damian Minkov of Jitsi reports:

https://github.com/jitsi/libsrc/blob/master/smack/patches/08-vcardprovider.patch

It is because according to xep-0054 you can have vcard with the following entry:
<TEL><NUMBER>2029</NUMBER></TEL>
With that entry the current VCardProvider skips this number cause it
doesn't have any code (VOICE, VIDEO ...). The patch set VOICE to be
the default one, if others are missing.
And the default is work phone, as noted by the comments.

Note that XEP-54 DTD defines multiple elements with question marks

From http://www.w3schools.com/DTD/dtd_elements.asp

The ? sign in the example above declares that the child element "message" can occur zero or one time inside the "note" element.

It's possible that this bug exists also with other elements in VCardProvider

Environment

None

Activity

Fixed

Details

Assignee

Reporter

Expected Effort

Fix versions

Affects versions

Priority

Created April 9, 2014 at 1:02 PM
Updated August 17, 2014 at 1:11 PM
Resolved April 12, 2014 at 10:23 AM