tigase / beagle-im

(M) XMPP client for macOS based on TigaseSwift XMPP library
GNU General Public License v3.0
181 stars 21 forks source link

Import contacts from Address Book #128

Closed st52550 closed 1 year ago

st52550 commented 1 year ago

Hello,

I appreciate your work on this awesome app. But there is one feature missing. I thing that a lot of users would welcome this feature because we used it in macOS Jabber - iMessages and Adium.

When I add my XMPP account from Kerio XMPP server, it will add to app contact list all my accounts from my domain automatically which is great, but these accounts are in format: example1@domain.com example2@domain.com example3@domain.com ...

It is very time consuming to rename these accounts to real names of my colleagues. But there is one case, that it displays the full name correctly. I think, it is for manually assigned accounts for example in Adium in the past. So there comes the question, where is the source of BeagleIM contact information?

This request seems to be similar with issue #17, but I'm asking for one-time operation only. For example Adium requests for allowing the access to Contacts app in Security & Privacy setting at it's first start, BeagleIM not and there is no possibility to allow this. For better interpretation (from Adium's website): "By default, Adium will import contacts' names from the Address Book. It does this using the IM usernames listed on each AB card; if a username in your Contact List is found on one of the Address Book cards, the name on that card will be shown on that contact's row in the contact list in place of their username"

Thank you for your response.

hantu85 commented 1 year ago

Currently, there is no integration between address book from macOS and Beagle IM. I was thinking about this kind of integration (even with the possibility to add contacts to the address book based on contacts added to the Beagle IM roster), however, API for searching/managing the address book in macOS and iOS is not very pleasant to use, especially searching for matching contacts based on the XMPP address.

Due to that and the fact that many people these days are protecting their privacy and denying apps access to address books, I've decided to not work on this as would take time, and not many people might decide to use it.

On the other hand, while adding a person to the roster, I was wondering about fetching added person's VCard/nickname from their XMPP server (there are XEPs for that) and using that as the contact name in Beagle IM (by default).

st52550 commented 1 year ago

I understand your attitude with macOS Address Book. Yeah, there is a VCard (First name, Last Name, Nickname) in Kerio contacts and they are certainly also on other servers. They are displayed in Kerio contact list in web version of XMPP chat. So it would be great if there is possibility to read this information via XEP and display it in desktop app Beagle IM. It may not be the default option but as a checkbox in settings for example.

For now, is there any file (in macOS Application Support, Preferences,...) with saved contacts list which can be copied to another computer to the same location and correctly read by Beagle IM? What is the source of Beagle IM contacts names? I was wondering why few of my accounts is displayed with it's person names after first start of Beagle IM. I think that I renamed these accounts manually in Adium or Messages, so is there any shared space that Beagle IM reads for contacts information?

hantu85 commented 1 year ago

List of contacts with their names is stored locally by BeagleIM in SQLite3 database, but it is also sync with other XMPP clients with use of contacts list hosted on the XMPP server. This is called roster in XMPP and it is defined in XMPP RFC.

As you mentioned VCards, Beagle IM supports 2 XEPs describing VCard implementation (VCardTemp and VCard4) so it can already fetch and display your contact VCards. This can be seen in the contact list window, when you open context menu for the contact and select Details or in chat window, by clicking on (i) button in the top right corner.

st52550 commented 1 year ago

It's clear to me. So it looks like there is no support of VCardTemp or VCard4 although I found on Google that Kerio Connect should support VCardTemp. Maybe it uses it's own format which is supported and integrated to macOS Address Book only. I'm posting the image with contact details. It only displays username and there aren't any additional information in sqlite. In Kerio Connect are information such a name, phone etc. filled.

So the solution could be the one you pointed with fetching user's VCard /nickname or this is exactly the same XEPs that are already implemented (VCartTemp & VCard4)?

img
hantu85 commented 1 year ago

So the solution could be the one you pointed with fetching user's VCard /nickname or this is exactly the same XEPs that are already implemented (VCartTemp & VCard4)?

This is the same thing that I was suggesting to do. The only difference is that we now display vcard data only in this popup windows and not in the roster or in chat.

It only displays username and there aren't any additional information in sqlite. In Kerio Connect are information such a name, phone etc. filled.

You can try clicking on this "refresh button" (circular arrow), to force Beagle IM to refetch data from the server. Maybe that would help.

So it looks like there is no support of VCardTemp or VCard4 although I found on Google that Kerio Connect should support VCardTemp. Maybe it uses it's own format which is supported and integrated to macOS Address Book only.

I have no idea what or how was implemented in Kerio Connect. We are developing XMPP client that follows XMPP specification and extensions of this specification published by the XSF so that it is compatible with XMPP servers that are also following standards.

st52550 commented 1 year ago

I solved the problem with VCards. There is an option in Kerio Connect to public the contact in the GAL. Then it fetch the account's name correctly via XEP vcard-temp. So in the contact details in Beagle IM is everything right. If anyone reading this post has similar issue with Kerio, I hope that it will help you.

Can I ask you to add the option (pointed in your first answer) in Beagle IM to use these fetched names in Beagle IM's Contact List - option in settings or default - in some of your next releases? I would be very grateful. Thanks for the clue to find the problem.

st52550 commented 1 year ago

Hello hantu85,

I'm closing this issue because everything is right on your side and the app is awesome! The last point with the names in Beagle IM contacts list was solved by restoring every account's IM contacts list in Kerio XMPP server, so the solution was on the server side all the time.

I wish you much success in your professional and personal life.