Commit eaecac85 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(src/components/chat/ChatModel): create thumbnail when message is sent

parent 490ff801
......@@ -356,8 +356,6 @@ void ChatModel::resendMessage (int id) {
case MessageStatusNotDelivered: {
shared_ptr<linphone::ChatMessage> message = static_pointer_cast<linphone::ChatMessage>(entry.second);
// TODO: Remove workaround in a future linphone core version.
// `sendChatMessage` duplicates the message on resend.
shared_ptr<linphone::ChatMessage> message2 = message->clone();
message2->setListener(m_message_handlers);
m_chat_room->sendChatMessage(message2);
......@@ -391,6 +389,8 @@ void ChatModel::sendFileMessage (const QString &path) {
message->setFileTransferFilepath(::Utils::qStringToLinphoneString(path));
message->setListener(m_message_handlers);
createThumbnail(message);
insertMessageAtEnd(message);
m_chat_room->sendChatMessage(message);
......
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