diff --git a/src/components/chat/ChatModel.cpp b/src/components/chat/ChatModel.cpp index 6c5e75ddf..ebba5d24f 100644 --- a/src/components/chat/ChatModel.cpp +++ b/src/components/chat/ChatModel.cpp @@ -368,10 +368,8 @@ void ChatModel::setSipAddresses (const QString &peerAddress, const QString &loca ); // Get calls. - // TODO: Add an API to find with local and peer addresses. - for (auto &callLog : core->getCallHistoryForAddress(mChatRoom->getPeerAddress())) - if (mChatRoom->getLocalAddress()->weakEqual(callLog->getLocalAddress())) - insertCall(callLog); + for (auto &callLog : core->getCallHistory(mChatRoom->getPeerAddress(), mChatRoom->getLocalAddress())) + insertCall(callLog); qInfo() << QStringLiteral("ChatModel (%1, %2) loaded in %3 milliseconds.") .arg(peerAddress).arg(localAddress).arg(timer.elapsed());