diff --git a/coreapi/chat.c b/coreapi/chat.c index 61708382c..b033d8f34 100644 --- a/coreapi/chat.c +++ b/coreapi/chat.c @@ -124,7 +124,9 @@ LinphoneChatRoom *linphone_core_get_chat_room(LinphoneCore *lc, const LinphoneAd } LinphoneChatRoom * linphone_core_create_client_group_chat_room(LinphoneCore *lc) { - return linphone_client_group_chat_room_new(lc); + LinphoneChatRoom *cr = _linphone_client_group_chat_room_new(lc); + lc->chatrooms = bctbx_list_append(lc->chatrooms, cr); + return cr; } void linphone_core_delete_chat_room(LinphoneCore *lc, LinphoneChatRoom *cr) { diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 18db06759..a168fcbae 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -7067,12 +7067,12 @@ LinphoneConference *linphone_core_get_conference(LinphoneCore *lc) { return lc->conf_ctx; } -void linphone_core_set_chat_conference_factory_uri(LinphoneCore *lc, const char *uri) { - lp_config_set_string(linphone_core_get_config(lc), "misc", "chat_conference_factory_uri", uri); +void linphone_core_set_conference_factory_uri(LinphoneCore *lc, const char *uri) { + lp_config_set_string(linphone_core_get_config(lc), "misc", "conference_factory_uri", uri); } -const char * linphone_core_get_chat_conference_factory_uri(const LinphoneCore *lc) { - return lp_config_get_string(linphone_core_get_config(lc), "misc", "chat_conference_factory_uri", nullptr); +const char * linphone_core_get_conference_factory_uri(const LinphoneCore *lc) { + return lp_config_get_string(linphone_core_get_config(lc), "misc", "conference_factory_uri", nullptr); } void linphone_core_set_tls_cert(LinphoneCore *lc, const char *tls_cert) { diff --git a/coreapi/private.h b/coreapi/private.h index 46a3d3813..3899a8509 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -460,7 +460,7 @@ void _linphone_proxy_config_release_ops(LinphoneProxyConfig *obj); /*chat*/ LinphoneChatRoom * linphone_chat_room_new(LinphoneCore *core, const LinphoneAddress *addr); -LinphoneChatRoom * linphone_client_group_chat_room_new(LinphoneCore *lc); +LinphoneChatRoom *_linphone_client_group_chat_room_new(LinphoneCore *core); void linphone_chat_room_release(LinphoneChatRoom *cr); void linphone_chat_room_set_call(LinphoneChatRoom *cr, LinphoneCall *call); bctbx_list_t * linphone_chat_room_get_transient_messages(const LinphoneChatRoom *cr); diff --git a/include/linphone/core.h b/include/linphone/core.h index ebb981018..231557035 100644 --- a/include/linphone/core.h +++ b/include/linphone/core.h @@ -4169,9 +4169,19 @@ LINPHONE_PUBLIC LinphoneStatus linphone_core_stop_conference_recording(LinphoneC */ LINPHONE_PUBLIC LinphoneConference *linphone_core_get_conference(LinphoneCore *lc); -void linphone_core_set_chat_conference_factory_uri(LinphoneCore *lc, const char *uri); +/** + * Set the conference factory uri. + * @param[in] lc A #LinphoneCore object + * @param[in] uri The uri of the conference factory + */ +void linphone_core_set_conference_factory_uri(LinphoneCore *lc, const char *uri); -const char * linphone_core_get_chat_conference_factory_uri(const LinphoneCore *lc); +/** + * Get the conference factory uri. + * @param[in] lc A #LinphoneCore object + * @return The uri of the conference factory + */ +const char * linphone_core_get_conference_factory_uri(const LinphoneCore *lc); /** * @} diff --git a/src/c-wrapper/api/c-chat-room.cpp b/src/c-wrapper/api/c-chat-room.cpp index debae113a..6ae4f109f 100644 --- a/src/c-wrapper/api/c-chat-room.cpp +++ b/src/c-wrapper/api/c-chat-room.cpp @@ -278,8 +278,8 @@ LinphoneChatRoom *linphone_chat_room_new (LinphoneCore *core, const LinphoneAddr return cr; } -LinphoneChatRoom *linphone_client_group_chat_room_new (LinphoneCore *core) { - const char *factoryUri = linphone_core_get_chat_conference_factory_uri(core); +LinphoneChatRoom *_linphone_client_group_chat_room_new (LinphoneCore *core) { + const char *factoryUri = linphone_core_get_conference_factory_uri(core); if (!factoryUri) return nullptr; LinphoneAddress *factoryAddr = linphone_address_new(factoryUri); diff --git a/src/chat/client-group-chat-room.cpp b/src/chat/client-group-chat-room.cpp index bdf63dc9c..9e03e37d2 100644 --- a/src/chat/client-group-chat-room.cpp +++ b/src/chat/client-group-chat-room.cpp @@ -33,7 +33,7 @@ ClientGroupChatRoomPrivate::ClientGroupChatRoomPrivate (LinphoneCore *core) : Ch ClientGroupChatRoom::ClientGroupChatRoom (LinphoneCore *core, const Address &me) : ChatRoom(*new ChatRoomPrivate(core)), RemoteConference(core, me, nullptr) { - string factoryUri = linphone_core_get_chat_conference_factory_uri(core); + string factoryUri = linphone_core_get_conference_factory_uri(core); focus = make_shared(factoryUri); CallSessionParams csp; shared_ptr session = focus->getPrivate()->createSession(*this, &csp, false, this);