From 032f6cd91a276879a3c97959b446f61d80f85554 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 15 Mar 2018 15:57:59 +0100 Subject: [PATCH] When creating a message with no text, create an empty Content so we can use it to store an appData --- src/c-wrapper/api/c-chat-room.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/c-wrapper/api/c-chat-room.cpp b/src/c-wrapper/api/c-chat-room.cpp index 91dbad4c0..e549964e0 100644 --- a/src/c-wrapper/api/c-chat-room.cpp +++ b/src/c-wrapper/api/c-chat-room.cpp @@ -113,12 +113,7 @@ const LinphoneAddress *linphone_chat_room_get_local_address (LinphoneChatRoom *c } LinphoneChatMessage *linphone_chat_room_create_message (LinphoneChatRoom *cr, const char *message) { - shared_ptr cppPtr; - if (message && strlen(message) > 0) { - cppPtr = L_GET_CPP_PTR_FROM_C_OBJECT(cr)->createChatMessage(L_C_TO_STRING(message)); - } else { - cppPtr = L_GET_CPP_PTR_FROM_C_OBJECT(cr)->createChatMessage(); - } + shared_ptr cppPtr = L_GET_CPP_PTR_FROM_C_OBJECT(cr)->createChatMessage(L_C_TO_STRING(message)); LinphoneChatMessage *object = L_INIT(ChatMessage); L_SET_CPP_PTR_FROM_C_OBJECT(object, cppPtr); return object;