Profilen sinkronizazioa

There are two types of profiles. The one for the current account and the ones from contacts. As this vCard contains data, such as the avatar (the profile picture) and the display name, it should be synced as soon as possible. But it must be only sent when required to avoid unnecessary data transmissions. The format used to store the profiles is a vCard (https://datatracker.ietf.org/doc/html/rfc6350).

Non gordetzen dira profilak?

Nire burua

It is in the ${idPath_}/profile.vcf e.g.: .local/share/jami/xxxxxx/profile.vcf file on GNU/Linux.

Kontaktua

Because this logic is still managed per client, it depends on the client. However, on Desktop, this is unified and stored in: ${idPath_}/profiles/${base64(uri)}.vcf

Profil bat bidaltzen denean

Deiak

At the beginning of a call, generally the client sends the vCard. However, this method should be removed in favor of the other located in the daemon.

Bidali kontaktuaren gailuetara.

When connecting to a new device, a SIP or a sync channel is done. When this channel is ready, we check if we need to send the profile. To do this, the hash of the profile is compared to the one in the cache (${cacheDir}/${accId}/vcard/sha3 like ~/.cache/jami/xxxxx/vcard/sha3 on GNU/Linux), and the ${cacheDir}/${accId}/vcard/deviceId file is checked. Cf. JamiAccount::needToSendProfile(). If not present, the profile of the account is sent. Typically, the name of the channel will be «vcard://xxx» where the issuer is the one sending the profile.

Multiple devices

If the profile is sent and the device is from the same account, conversations are checked, and we send profiles of all members. The channel name will be «\({conversationId}/profile/\){memberUri}.vcf». Behavior tested in daemon/test/unitTest/syncHistory/syncHistory.cpp.