Commit daf2432e authored by Ronan's avatar Ronan

fix(core-chat-room): do not remove from db if chat room is not in ram

parent a314ffd2
......@@ -190,16 +190,10 @@ void Core::deleteChatRoom (const shared_ptr<const ChatRoom> &chatRoom) {
auto it = d->chatRoomsById.find(chatRoomId);
if (it != d->chatRoomsById.end()) {
auto it = find(d->chatRooms.begin(), d->chatRooms.end(), chatRoom);
if (it != d->chatRooms.end()) {
d->chatRooms.erase(it);
return;
}
lError() << "Unable to remove chat room: (peer=" <<
chatRoomId.getPeerAddress().asString() << ", local=" << chatRoomId.getLocalAddress().asString() << ").";
L_ASSERT(it != d->chatRooms.end());
d->chatRooms.erase(it);
d->mainDb->deleteChatRoom(chatRoomId);
}
d->mainDb->deleteChatRoom(chatRoomId);
}
LINPHONE_END_NAMESPACE
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