Commit 032f6cd9 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

When creating a message with no text, create an empty Content so we can use it to store an appData

parent f58ba408
......@@ -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<LinphonePrivate::ChatMessage> 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<LinphonePrivate::ChatMessage> 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment