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

Read IMPP fields in a vcard #105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Lertsenem
Copy link

IMPP (Instant Messaging and Presence Protocol) addresses fields are defined by
RFC4770. In particular, Android default contacts manager implements them.

This small patch allows to read (and print) the IMPP addresses
informations stored in a vcard.

Of course there's much more to do to fully support IMPP addresses, such as take
into account standard types, and allow khard to write them, but this is a
start.

This small patch allows to read (and print) the IMPP addresses
informations stored in a vcard.
@scheibler
Copy link
Collaborator

scheibler commented Dec 12, 2016 via email

@Lertsenem
Copy link
Author

Lertsenem commented Dec 12, 2016

Damn, I didn't realize the standards implementations were so bad. :/

I did some testing with an earlier version of Android (Lollipop) and it could not see the self-defined attribute X-SKYPE I wrote with khard. Doing some test with the IMPP field, I figured the correct way was to write IMPP:Skype:Username (and indeed, writing IMPP:Twitter:@Username totally worked for me). I just supposed the TYPE=personal,... part of the RFC was not implemented yet and went on.

What I think happend, is that Android tried to follow (partially at least) the RFC, but on later versions realized everyone but them was using self-defined attributes and decided to do both, figuring that at least one field would work with any app.

So maybe it's not a good idea to let khard write such IMPP fields after all, at least until a well-defined and well-implemented standard emerge. Nevertheless I think my patch is still kind of relevant (with some adjustments), as a way to read IMPP fields (even badly formatted ones). As I said, earlier Android versions only use those fields, and a way to read them on my computer would be nice.

I'll leave the decision to you. :]

@DamienCassou
Copy link

I face a similar problem. If I use X-JABBER with khard, I won't see the field on Android and the conversations app won't see it either. When I set the IMPP:XMPP field from android, I won't see it in khard.

Which workaround do you propose so I see the XMPP addresses of my contacts on both android and khard?

@ghost
Copy link

ghost commented Oct 14, 2020

My Android 9 completely ignores the X-SKYPE field, and almost all X-* fields altogether. So does Google Contacts. The server does not erase them from vcards synchronized, but does not use either.

It does use the "item1.IMPP;X-SERVICE-TYPE=Skype:skype:from-phone-skype" format, where X-SERVICE-TYPE apparently is something Google-specific.

@lucc lucc added help wanted waiting Waiting for more information labels Jun 29, 2022
@sylph1o
Copy link

sylph1o commented Sep 23, 2022

I also use frequently the IMPP field and was surprised that khard did not display it. The format is defined in RFC 6350, § 6.4.3 (it replaces RFC 4470 mentioned above), e.g.

My experience is that it is well supported on Android with both the stock 'Contacts' application and 'Simple Contacts' by SimpleMobileTools. I synchronise the address book with Nextcloud via DAVx⁵ without issue. This works with any attribute that I define (in place of 'xmpp' in the example above).

For example, Simple Contacts uses the ez-vcard library for its vCard exports. The wiki of this library gives the same definition of the IMPP field format (and refers to the same RFC for vCard 4.0).

It would be a useful feature for me if khard could support that field as well (at least displaying it). Could this PR be re-considered? What kind of help is wanted?

@lucc
Copy link
Owner

lucc commented Sep 24, 2022

@sylph1o in order to bring this forward somebody has to fix the code that it is merge conflict free, and also make it conform with rfc 6350.

The second step are tests for reading and writing the attribute.

@lucc lucc changed the base branch from master to main December 1, 2023 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted waiting Waiting for more information
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants