From 2ab177b4d7d60df70f92ce0d582942449c4bb9d7 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 29 Oct 2018 15:35:11 +0100 Subject: [PATCH] fix(ChatModel): use peer/local addresses to get call history --- src/components/chat/ChatModel.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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());