diff --git a/src/chat/chat-room/client-group-to-basic-chat-room.cpp b/src/chat/chat-room/client-group-to-basic-chat-room.cpp index c72f9cfec..26b6fe47d 100644 --- a/src/chat/chat-room/client-group-to-basic-chat-room.cpp +++ b/src/chat/chat-room/client-group-to-basic-chat-room.cpp @@ -79,10 +79,15 @@ public: cgcr->getPrivate()->setCallSessionListener(nullptr); cgcr->getPrivate()->setChatRoomListener(nullptr); Core::deleteChatRoom(q->getSharedFromThis()); - setupProxy(); + LinphoneChatRoom *lcr = L_GET_C_BACK_PTR(q); shared_ptr bcr = cgcr->getCore()->getOrCreateBasicChatRoom(invitedAddresses.front()); L_SET_CPP_PTR_FROM_C_OBJECT(lcr, bcr); + /* getOrCreateBasicChatRoom will automatically set the state to Instantiated and Created + * but because CPP ptr hasn't been set yet in this case the application's ChatRoom won't be notified + * that's why we set both states again here... */ + bcr->getPrivate()->setState(ChatRoom::State::Instantiated); + bcr->getPrivate()->setState(ChatRoom::State::Created); return; } cgcr->getPrivate()->onCallSessionStateChanged(session, newState, message);