From 8b5c4e0305b8a0fa5c73e4bd49710b8b43e2d973 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 6 Apr 2018 15:15:37 +0200 Subject: [PATCH] Fixed proxy chat room not being notified of Created state when we fallback to a basic chat room --- src/chat/chat-room/client-group-to-basic-chat-room.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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);