Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
3abfd274
Commit
3abfd274
authored
Sep 22, 2017
by
Sylvain Berfini
🐮
Browse files
Create a shared_ptr of ChatMessage in ChatRoom createMessage
parent
8167360f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/chat/chat-room.cpp
View file @
3abfd274
...
...
@@ -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
()));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment