mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 07:38:09 +00:00
Create a shared_ptr of ChatMessage in ChatRoom createMessage
This commit is contained in:
parent
8167360f47
commit
3abfd2749d
1 changed files with 2 additions and 2 deletions
|
|
@ -610,8 +610,8 @@ LinphoneChatMessage *ChatRoom::createFileTransferMessage (const LinphoneContent
|
|||
}
|
||||
|
||||
LinphoneChatMessage *ChatRoom::createMessage (const string &message) {
|
||||
ChatMessage chatMessage(static_pointer_cast<ChatRoom>(shared_from_this()));
|
||||
LinphoneChatMessage *msg = chatMessage.getBackPtr();
|
||||
shared_ptr<ChatMessage> chatMessage = make_shared<ChatMessage>(static_pointer_cast<ChatRoom>(shared_from_this()));
|
||||
LinphoneChatMessage *msg = chatMessage->getBackPtr();
|
||||
linphone_chat_message_set_chat_room(msg, GET_BACK_PTR(this));
|
||||
linphone_chat_message_set_state(msg, LinphoneChatMessageStateIdle);
|
||||
linphone_chat_message_set_text(msg, message.empty() ? nullptr : ms_strdup(message.c_str()));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue