chat.c: dont change message state to in progress if we failed to send it

This commit is contained in:
Gautier Pelloux-Prayer 2016-02-22 16:25:23 +01:00
parent 1f82ae286c
commit 17ee1f1590

View file

@ -418,7 +418,10 @@ void _linphone_chat_room_send_message(LinphoneChatRoom *cr, LinphoneChatMessage
linphone_chat_room_delete_composing_refresh_timer(cr);
}
linphone_chat_message_set_state(msg, LinphoneChatMessageStateInProgress);
// if operation failed, we should not change message state
if (msg->state == LinphoneChatMessageOutgoing) {
linphone_chat_message_set_state(msg, LinphoneChatMessageStateInProgress);
}
}
void linphone_chat_message_update_state(LinphoneChatMessage *msg, LinphoneChatMessageState new_state) {