diff --git a/include/linphone/api/c-chat-room.h b/include/linphone/api/c-chat-room.h index 33bedd0c4..4aceee53f 100644 --- a/include/linphone/api/c-chat-room.h +++ b/include/linphone/api/c-chat-room.h @@ -333,6 +333,13 @@ LINPHONE_PUBLIC void linphone_chat_room_set_participant_admin_status (LinphoneCh */ LINPHONE_PUBLIC void linphone_chat_room_set_subject (LinphoneChatRoom *cr, const char *subject); +/** + * Gets the list of participants that are currently composing + * @param[in] cr A LinphoneChatRoom object + * @return \bctbx_list{LinphoneAddress *} list of addresses that are in the is_composing state + */ +LINPHONE_PUBLIC bctbx_list_t * linphone_chat_room_get_composing_addresses(LinphoneChatRoom *cr); + /** * Returns back pointer to #LinphoneCore object. * @deprecated use linphone_chat_room_get_core() diff --git a/src/c-wrapper/api/c-chat-room.cpp b/src/c-wrapper/api/c-chat-room.cpp index f92827208..08a0ff47e 100644 --- a/src/c-wrapper/api/c-chat-room.cpp +++ b/src/c-wrapper/api/c-chat-room.cpp @@ -274,6 +274,15 @@ void linphone_chat_room_set_subject (LinphoneChatRoom *cr, const char *subject) L_GET_CPP_PTR_FROM_C_OBJECT(cr)->setSubject(L_C_TO_STRING(subject)); } +bctbx_list_t * linphone_chat_room_get_composing_addresses(LinphoneChatRoom *cr) { + LinphonePrivate::ChatRoomPrivate *room = L_GET_PRIVATE_FROM_C_OBJECT(cr); + bctbx_list_t *result = NULL; + for (auto i = room->remoteIsComposing.begin(); i != room->remoteIsComposing.end(); ++i) { + result = bctbx_list_append(result, linphone_address_new((*i).c_str())); + } + return result; +} + // ============================================================================= // Reference and user data handling functions. // =============================================================================