- Fix special characters on LDAP search

- Fix LDAP results are propagated to chat room on call
This commit is contained in:
Julien Wadel 2021-09-02 18:06:32 +02:00
parent 776987c0e0
commit a1d47d0c30
4 changed files with 16 additions and 4 deletions

View file

@ -1450,7 +1450,7 @@ Ephemeral message is only supported in conference based chat room!&apos;</extrac
</message>
<message>
<source>conferenceSubjectChangedEvent</source>
<extracomment>&apos;New subject : %1&apos; : Little message to show on the event when the subject of the chat romm has been changed. %1 is the new subject.</extracomment>
<extracomment>&apos;New subject : %1&apos; : Little message to show on the event when the subject of the chat room has been changed. %1 is the new subject.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
@ -2417,7 +2417,7 @@ Ephemeral message is only supported in conference based chat room!&apos;</extrac
<source>timelineFilterSimpleRooms</source>
<extracomment>&apos;Simple rooms&apos; : Filter item</extracomment>
<translation type="unfinished"></translation>
<extra-Mode>Selecting it will show all simple romms</extra-Mode>
<extra-Mode>Selecting it will show all simple rooms</extra-Mode>
</message>
<message>
<source>timelineFilterSecureRooms</source>

View file

@ -680,6 +680,11 @@ void CallModel::callEnded(){
void CallModel::setRemoteDisplayName(const std::string& name){
mRemoteAddress->setDisplayName(name);
auto callLog = mCall->getCallLog();
if(name!= "") {
auto core = CoreManager::getInstance()->getCore();
callLog->setRemoteAddress(Utils::interpretUrl(getFullPeerAddress()));
}
emit fullPeerAddressChanged();
}
// -----------------------------------------------------------------------------

View file

@ -469,7 +469,14 @@ QString Utils::getDisplayName(const std::shared_ptr<const linphone::Address>& ad
if(model && model->getVcardModel())
displayName = model->getVcardModel()->getUsername();
else{
displayName = Utils::coreStringToAppString(address->getDisplayName());
auto callHistory = CoreManager::getInstance()->getCore()->getCallLogs();
auto callLog = std::find_if(callHistory.begin(), callHistory.end(), [address](std::shared_ptr<linphone::CallLog>& cl){
return cl->getRemoteAddress()->weakEqual(address);
});
if(callLog != callHistory.end())
displayName = Utils::coreStringToAppString((*callLog)->getRemoteAddress()->getDisplayName());
if(displayName == "")
displayName = Utils::coreStringToAppString(address->getDisplayName());
if(displayName == "")
displayName = Utils::coreStringToAppString(address->getUsername());
}

@ -1 +1 @@
Subproject commit 48e87038360e272436570b6dc062c34f85625237
Subproject commit b1dc3232192816be2d81a263be3ff5a11f91f75e