Commit 2a721444 authored by Ghislain MARY's avatar Ghislain MARY

Store message ID in DB when sending it so that an IMDN received before 200OK is correctly handled.

parent bea54120
......@@ -632,6 +632,7 @@ void ChatMessagePrivate::send () {
int errorCode = 0;
currentSendStep |= ChatMessagePrivate::Step::Started;
imdnId.clear();
if (toBeStored && currentSendStep == (ChatMessagePrivate::Step::Started | ChatMessagePrivate::Step::None))
storeInDb();
......@@ -791,6 +792,7 @@ void ChatMessagePrivate::send () {
if (imdnId.empty())
setImdnMessageId(op->getCallId()); /* must be known at that time */
updateInDb(); // Update IMDN message ID in DB, TODO: update only the message ID, do not rewrite the contents
if (lcall && linphone_call_get_op(lcall) == op) {
/* In this case, chat delivery status is not notified, so unrefing chat message right now */
......
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