Commit 1b942b33 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Fixed message state if linphone has crashed while sending it

parent c0f5d97a
......@@ -601,7 +601,11 @@ shared_ptr<EventLog> MainDbPrivate::selectConferenceChatMessageEvent (
ChatMessagePrivate *dChatMessage = chatMessage->getPrivate();
dChatMessage->setState(ChatMessage::State(row.get<int>(7)), true);
ChatMessage::State messageState = (ChatMessage::State) row.get<int>(7);
// This is necessary if linphone has crashed while sending a message. It will set the correct state so the user can resend it.
if (messageState == ChatMessage::State::Idle || messageState == ChatMessage::State::InProgress)
messageState = ChatMessage::State::NotDelivered;
dChatMessage->setState(messageState, true);
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