From 5394f91a946afd6684031324a68f259e2fb6e66f Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 20 Dec 2017 11:29:25 +0100 Subject: [PATCH] Check the reason is "Not Acceptable" for doing fallback from client group chat room to basic chat room. --- src/chat/chat-room/client-group-to-basic-chat-room.cpp | 3 ++- 1 file changed, 2 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 7bd420f80..0aa3ec351 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 @@ -21,6 +21,7 @@ #include "client-group-to-basic-chat-room.h" #include "proxy-chat-room-p.h" #include "c-wrapper/c-wrapper.h" +#include "conference/session/call-session.h" #include "core/core-p.h" // ============================================================================= @@ -61,7 +62,7 @@ public: if (!cgcr) return; if ((newState == LinphoneCallError) && (cgcr->getState() == ChatRoom::State::CreationPending) - && (invitedAddresses.size() == 1)) { + && (session->getReason() == LinphoneReasonNotAcceptable) && (invitedAddresses.size() == 1)) { cgcr->getPrivate()->onCallSessionStateChanged(session, newState, message); cgcr->getPrivate()->setCallSessionListener(nullptr); cgcr->getPrivate()->setChatRoomListener(nullptr);