diff --git a/src/conference/handlers/local-conference-event-handler.cpp b/src/conference/handlers/local-conference-event-handler.cpp index d02280dc7..da786a78c 100644 --- a/src/conference/handlers/local-conference-event-handler.cpp +++ b/src/conference/handlers/local-conference-event-handler.cpp @@ -324,9 +324,9 @@ string LocalConferenceEventHandlerPrivate::createNotify (ConferenceType confInfo if (notifyId == -1) { lastNotify = lastNotify + 1; confInfo.setVersion(lastNotify); - } else { + } else confInfo.setVersion(static_cast(notifyId)); - } + confInfo.setState(isFullState ? StateType::full : StateType::partial); if (!confInfo.getConferenceDescription()) { ConferenceDescriptionType description = ConferenceDescriptionType(); @@ -359,23 +359,25 @@ void LocalConferenceEventHandlerPrivate::notifyParticipant (const string ¬ify } void LocalConferenceEventHandlerPrivate::notifyParticipantDevice (const string ¬ify, const shared_ptr &device, bool multipart) { - if (device->isSubscribedToConferenceEventPackage() && !notify.empty()) { - LinphoneEvent *ev = device->getConferenceSubscribeEvent(); - LinphoneEventCbs *cbs = linphone_event_get_callbacks(ev); - linphone_event_cbs_set_user_data(cbs, this); - linphone_event_cbs_set_notify_response(cbs, notifyResponseCb); - LinphoneContent *content = linphone_core_create_content(ev->lc); - linphone_content_set_buffer(content, (const uint8_t *)notify.c_str(), strlen(notify.c_str())); - if (multipart) { - linphone_content_set_type(content, "multipart"); - linphone_content_set_subtype(content, "mixed;boundary=---------------------------14737809831466499882746641449"); - } else { - linphone_content_set_type(content, "application"); - linphone_content_set_subtype(content, "conference-info"); - } - linphone_event_notify(ev, content); - linphone_content_unref(content); - } + if (!device->isSubscribedToConferenceEventPackage() || notify.empty()) + return; + + LinphoneEvent *ev = device->getConferenceSubscribeEvent(); + LinphoneEventCbs *cbs = linphone_event_get_callbacks(ev); + linphone_event_cbs_set_user_data(cbs, this); + linphone_event_cbs_set_notify_response(cbs, notifyResponseCb); + LinphoneContent *content = linphone_core_create_content(ev->lc); + linphone_content_set_buffer(content, (const uint8_t *)notify.c_str(), strlen(notify.c_str())); + linphone_content_set_type( + content, + multipart ? "multipart" : "application" + ); + linphone_content_set_subtype( + content, + multipart ? "mixed;boundary=---------------------------14737809831466499882746641449" : "conference-info" + ); + linphone_event_notify(ev, content); + linphone_content_unref(content); } // =============================================================================