diff --git a/linphone-app/assets/images/calendar_participants_custom.svg b/linphone-app/assets/images/calendar_participants_custom.svg new file mode 100644 index 000000000..2e0033ff8 --- /dev/null +++ b/linphone-app/assets/images/calendar_participants_custom.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + diff --git a/linphone-app/src/components/call/CallModel.cpp b/linphone-app/src/components/call/CallModel.cpp index 820dbfbf2..6f0bebbe2 100644 --- a/linphone-app/src/components/call/CallModel.cpp +++ b/linphone-app/src/components/call/CallModel.cpp @@ -464,7 +464,15 @@ void CallModel::accept (bool withVideo) { shared_ptr params = core->createCallParams(mCall); params->enableVideo(withVideo); setRecordFile(params); - + auto localAddress = mCall->getCallLog()->getLocalAddress(); + std::list> proxies = core->getProxyConfigList() ; + for(auto proxy : proxies){ + if(proxy->getIdentityAddress()->weakEqual(localAddress)) { + params->setProxyConfig(proxy); + break; + } + } + mCall->acceptWithParams(params); } } diff --git a/linphone-app/src/components/conference/ConferenceAddModel.cpp b/linphone-app/src/components/conference/ConferenceAddModel.cpp index f97ff1779..57be73eee 100644 --- a/linphone-app/src/components/conference/ConferenceAddModel.cpp +++ b/linphone-app/src/components/conference/ConferenceAddModel.cpp @@ -147,29 +147,46 @@ bool ConferenceHelperModel::ConferenceAddModel::removeFromConference (const QStr void ConferenceHelperModel::ConferenceAddModel::update () { shared_ptr conference = mConferenceHelperModel->mCore->getConference(); + bool enablingVideo = true;// Video is not yet fully supported by the application in conference if(!conference){ auto parameters = mConferenceHelperModel->mCore->createConferenceParams(conference); - parameters->enableVideo(false);// Video is not yet fully supported by the application in conference + parameters->enableVideo(enablingVideo); conference = mConferenceHelperModel->mCore->createConferenceWithParams(parameters); } auto currentCalls = CoreManager::getInstance()->getCore()->getCalls(); list> allLinphoneAddresses; + list> newCalls; + list> runningCallsToAdd; + -//1) Invite participants first to avoid removing conference if empty for (const auto &map : mRefs) { shared_ptr linphoneAddress = map->value("__linphoneAddress").value>(); Q_CHECK_PTR(linphoneAddress); allLinphoneAddresses.push_back(linphoneAddress); + auto haveCall = std::find_if(currentCalls.begin(), currentCalls.end(), [linphoneAddress](const std::shared_ptr& call){ + return call->getRemoteAddress()->weakEqual(linphoneAddress); + }); + if( haveCall == currentCalls.end()) + newCalls.push_back(linphoneAddress); + else + runningCallsToAdd.push_back(*haveCall); } - if( allLinphoneAddresses.size() > 0){ + +// 1) Add running calls + if( runningCallsToAdd.size() > 0){ + conference->addParticipants(runningCallsToAdd); + } + //1) Invite participants + if( newCalls.size() > 0){ auto parameters = CoreManager::getInstance()->getCore()->createCallParams(nullptr); - parameters->enableVideo(false); + parameters->enableVideo(enablingVideo); conference->inviteParticipants( - allLinphoneAddresses, + newCalls, parameters ); } -// 2) Put in pause and remove all calls that are not in the conference list + +// 3) Put in pause and remove all calls that are not in the conference list for(const auto &call : CoreManager::getInstance()->getCore()->getCalls()){ const std::string callAddress = call->getRemoteAddress()->asStringUriOnly(); auto address = allLinphoneAddresses.begin(); diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.cpp index 144e1162d..8ece03e55 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.cpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.cpp @@ -39,12 +39,21 @@ ConferenceInfoMapModel::ConferenceInfoMapModel (QObject *parent) : QAbstractListModel(parent) { auto conferenceInfos = CoreManager::getInstance()->getCore()->getConferenceInformationList(); + auto me = CoreManager::getInstance()->getCore()->getDefaultAccount()->getParams()->getIdentityAddress(); for(auto conferenceInfo : conferenceInfos){ - auto conferenceInfoModel = ConferenceInfoModel::create( conferenceInfo ); - QDate t = conferenceInfoModel->getDateTime().date(); - if( !mMappedList.contains(t)) - mMappedList[t] = new ConferenceInfoListModel(); - mMappedList[t]->add(conferenceInfoModel); + std::list> participants = conferenceInfo->getParticipants(); + bool haveMe = conferenceInfo->getOrganizer()->weakEqual(me); + if(!haveMe) + haveMe = (std::find_if(participants.begin(), participants.end(), [me](const std::shared_ptr& address){ + return me->weakEqual(address); + }) != participants.end()); + if(haveMe){ + auto conferenceInfoModel = ConferenceInfoModel::create( conferenceInfo ); + QDate t = conferenceInfoModel->getDateTime().date(); + if( !mMappedList.contains(t)) + mMappedList[t] = new ConferenceInfoListModel(); + mMappedList[t]->add(conferenceInfoModel); + } } }