Commit 2ab177b4 authored by Ronan's avatar Ronan Committed by Benjamin REIS

fix(ChatModel): use peer/local addresses to get call history

parent 52161f78
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment