From 70219e4c7775cdb42fc36f6d37691d8c8343fede Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 29 Sep 2017 15:43:31 +0200 Subject: [PATCH] Subscribe to the conference event package only when the contact returned by the conference factory contains the "isfocus" feature tag. --- src/chat/client-group-chat-room.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/chat/client-group-chat-room.cpp b/src/chat/client-group-chat-room.cpp index 3357fc5f1..961adb590 100644 --- a/src/chat/client-group-chat-room.cpp +++ b/src/chat/client-group-chat-room.cpp @@ -22,6 +22,7 @@ #include "conference/session/call-session-p.h" #include "conference/participant-p.h" #include "content/content.h" +#include "hacks/hacks.h" #include "logger/logger.h" // ============================================================================= @@ -108,7 +109,6 @@ void ClientGroupChatRoom::onConferenceCreated (const Address &addr) { L_D(); conferenceAddress = addr; d->setState(ChatRoom::State::Created); - eventHandler->subscribe(conferenceAddress); } void ClientGroupChatRoom::onConferenceTerminated (const Address &addr) { @@ -172,6 +172,8 @@ void ClientGroupChatRoom::onCallSessionStateChanged (const CallSession &session, Address addr(session.getRemoteContact()); addr.clean(); onConferenceCreated(addr); + if (Hacks::contactHasParam(session.getRemoteContact(), "isfocus")) + eventHandler->subscribe(conferenceAddress); } }