try to fix display name after call transfer (take the call log address instead of the call address)

(may be a mitel server problem)
This commit is contained in:
gaelle 2025-02-25 11:53:13 +01:00
parent c8b65fb5b2
commit e0e3838ccf
2 changed files with 3 additions and 3 deletions

View file

@ -61,7 +61,7 @@ CallHistoryCore::CallHistoryCore(const std::shared_ptr<linphone::CallLog> &callL
mDisplayName = Utils::coreStringToAppString(confinfo->getSubject());
} else {
mRemoteAddress = Utils::coreStringToAppString(addr->asStringUriOnly());
auto linphoneFriend = ToolModel::findFriendByAddress(mRemoteAddress);
auto linphoneFriend = ToolModel::findFriendByAddress(addr);
if (linphoneFriend) {
mFriendModel = Utils::makeQObject_ptr<FriendModel>(linphoneFriend);
mDisplayName = mFriendModel->getFullName();

View file

@ -117,11 +117,11 @@ CallCore::CallCore(const std::shared_ptr<linphone::Call> &call) : QObject(nullpt
mRemoteVideoEnabled =
videoDirection == linphone::MediaDirection::SendOnly || videoDirection == linphone::MediaDirection::SendRecv;
mState = LinphoneEnums::fromLinphone(call->getState());
auto remoteAddress = call->getRemoteAddress()->clone();
auto remoteAddress = call->getCallLog()->getRemoteAddress()->clone();
remoteAddress->clean();
mRemoteAddress = Utils::coreStringToAppString(remoteAddress->asStringUriOnly());
mRemoteUsername = Utils::coreStringToAppString(remoteAddress->getUsername());
auto linphoneFriend = ToolModel::findFriendByAddress(mRemoteAddress);
auto linphoneFriend = ToolModel::findFriendByAddress(remoteAddress);
if (linphoneFriend)
mRemoteName = Utils::coreStringToAppString(
linphoneFriend->getVcard() ? linphoneFriend->getVcard()->getFullName() : linphoneFriend->getName());