diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 866ace059..faf7813d8 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -128,7 +128,7 @@ static void call_received(SalCallOp *h) { linphone_address_unref(fromAddr); LinphonePrivate::Address addr(h->get_to()); if (addr.isValid()) { - LinphoneChatRoom *cr = _linphone_core_find_group_chat_room(lc, addr.asStringUriOnly().c_str()); + LinphoneChatRoom *cr = L_GET_C_BACK_PTR(lc->cppCore->findChatRoom(addr)); if (cr) { L_GET_PRIVATE_FROM_C_OBJECT(cr, ServerGroupChatRoom)->confirmJoining(h); return; @@ -751,7 +751,9 @@ static void refer_received(SalOp *op, const SalAddress *refer_to){ if (addr.hasUriParam("method") && (addr.getUriParamValue("method") == "BYE")) { if (linphone_core_conference_server_enabled(lc)) { // Removal of a participant at the server side - LinphoneChatRoom *cr = _linphone_core_find_group_chat_room(lc, op->get_to()); + LinphoneChatRoom *cr = L_GET_C_BACK_PTR( + lc->cppCore->findChatRoom(Address(op->get_to())) + ); if (cr) { Address fromAddr(op->get_from()); std::shared_ptr participant = L_GET_CPP_PTR_FROM_C_OBJECT(cr)->findParticipant(fromAddr); @@ -767,7 +769,9 @@ static void refer_received(SalOp *op, const SalAddress *refer_to){ } } else { // The server asks a participant to leave a chat room - LinphoneChatRoom *cr = _linphone_core_find_group_chat_room(lc, addr.asStringUriOnly().c_str()); + LinphoneChatRoom *cr = L_GET_C_BACK_PTR( + lc->cppCore->findChatRoom(addr) + ); if (cr) { L_GET_CPP_PTR_FROM_C_OBJECT(cr)->leave(); static_cast(op)->reply(SalReasonNone); diff --git a/src/c-wrapper/api/c-chat-room.cpp b/src/c-wrapper/api/c-chat-room.cpp index c30abf7dc..2e4bf0ec9 100644 --- a/src/c-wrapper/api/c-chat-room.cpp +++ b/src/c-wrapper/api/c-chat-room.cpp @@ -31,7 +31,7 @@ #include "chat/chat-room/server-group-chat-room-p.h" #include "conference/participant.h" #include "core/core-p.h" -#include "content/content.h" +#include "event-log/event-log.h" // ============================================================================= diff --git a/src/c-wrapper/c-wrapper.h b/src/c-wrapper/c-wrapper.h index 885a1c809..41df151db 100644 --- a/src/c-wrapper/c-wrapper.h +++ b/src/c-wrapper/c-wrapper.h @@ -45,14 +45,14 @@ F(ChatRoom, BasicChatRoom) \ F(ChatRoom, ClientGroupChatRoom) \ F(ChatRoom, RealTimeTextChatRoom) \ + F(ChatRoom, ServerGroupChatRoom) \ F(EventLog, ConferenceCallEvent) \ F(EventLog, ConferenceChatMessageEvent) \ F(EventLog, ConferenceEvent) \ F(EventLog, ConferenceNotifiedEvent) \ F(EventLog, ConferenceParticipantDeviceEvent) \ F(EventLog, ConferenceParticipantEvent) \ - F(EventLog, ConferenceSubjectEvent) \ - F(ChatRoom, ServerGroupChatRoom) + F(EventLog, ConferenceSubjectEvent) // ============================================================================= // Register belle-sip ID. diff --git a/src/conference/remote-conference-event-handler.cpp b/src/conference/remote-conference-event-handler.cpp index da3f19de8..8c83664bd 100644 --- a/src/conference/remote-conference-event-handler.cpp +++ b/src/conference/remote-conference-event-handler.cpp @@ -84,9 +84,14 @@ void RemoteConferenceEventHandler::notifyReceived (const string &xmlBody) { Address entityAddress(confInfo->getEntity().c_str()); Address cleanedConfAddress2(cleanedConfAddress); cleanedConfAddress2.setDomain(entityAddress.getDomain()); - if (confInfo->getEntity() == cleanedConfAddress.asString() - || confInfo->getEntity() == cleanedConfAddress2.asString()) { - if (confInfo->getConferenceDescription().present() && confInfo->getConferenceDescription().get().getSubject().present()) + if ( + confInfo->getEntity() == cleanedConfAddress.asString() || + confInfo->getEntity() == cleanedConfAddress2.asString() + ) { + if ( + confInfo->getConferenceDescription().present() && + confInfo->getConferenceDescription().get().getSubject().present() + ) d->listener->onSubjectChanged(tm, confInfo->getConferenceDescription().get().getSubject().get()); if (confInfo->getVersion().present())