mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
fix(core-chat-room): do not remove from db if chat room is not in ram
This commit is contained in:
parent
a314ffd2c2
commit
daf2432e1d
1 changed files with 3 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue