fix(src/components/chat/ChatModel): handle correctly call events

This commit is contained in:
Ronan Abhamon 2017-04-21 16:39:33 +02:00
parent 49f42df310
commit 3a1bd6a2c9

View file

@ -567,7 +567,10 @@ void ChatModel::resetMessagesCount () {
// -----------------------------------------------------------------------------
void ChatModel::handleCallStateChanged (const shared_ptr<linphone::Call> &call, linphone::CallState state) {
if (mChatRoom == call->getChatRoom() && (state == linphone::CallStateEnd || state == linphone::CallStateError))
if (
(state == linphone::CallStateEnd || state == linphone::CallStateError) &&
mChatRoom == CoreManager::getInstance()->getCore()->getChatRoom(call->getRemoteAddress())
)
insertCall(call->getCallLog());
}