Subscribe to the conference event package only when the contact returned by the conference factory contains the "isfocus" feature tag.

This commit is contained in:
Ghislain MARY 2017-09-29 15:43:31 +02:00
parent 5961e5a6aa
commit 70219e4c77

View file

@ -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);
}
}