1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-04 14:55:43 +02:00

update-profile: Handle ProfileReceived Signal for SIP Accounts

Since SIP accounts lack a URI, we need to address scenarios where the daemon includes the accountID in the uri parameter. Refer to 29623 for more details.

Change-Id: Ib58e77dc953269c87d67d4068866c93432d08aae
This commit is contained in:
Leopold Chappuis 2024-11-21 15:39:58 -05:00 committed by Léopold Chappuis
parent a01b578099
commit d188284245

View file

@ -1188,7 +1188,8 @@ ContactModelPimpl::slotProfileReceived(const QString& accountId,
if (accountId != linked.owner.id) if (accountId != linked.owner.id)
return; return;
if (linked.owner.profileInfo.uri == peer) { if (linked.owner.profileInfo.uri == peer || peer == "") {
// as SIP account doesn't have a uri, we emit a signal with the accountId in the peer parameter
const auto newProfileInfo = storage::getProfileData(accountId, ""); const auto newProfileInfo = storage::getProfileData(accountId, "");
linked.owner.accountModel->setAlias(accountId, newProfileInfo["alias"], false); linked.owner.accountModel->setAlias(accountId, newProfileInfo["alias"], false);
linked.owner.accountModel->setAvatar(accountId, newProfileInfo["avatar"], false); linked.owner.accountModel->setAvatar(accountId, newProfileInfo["avatar"], false);