diff --git a/src/chat/chat-message/chat-message.cpp b/src/chat/chat-message/chat-message.cpp index a65e2ca10..7b7cbb054 100644 --- a/src/chat/chat-message/chat-message.cpp +++ b/src/chat/chat-message/chat-message.cpp @@ -447,15 +447,13 @@ static void forceUtf8Content (Content &content) { void ChatMessagePrivate::notifyReceiving () { L_Q(); - if ((getContentType() == ContentType::Imdn) || (getContentType() == ContentType::ImIsComposing)) - return; - LinphoneChatRoom *chatRoom = L_GET_C_BACK_PTR(q->getChatRoom()); - linphone_chat_room_notify_chat_message_should_be_stored(chatRoom, L_GET_C_BACK_PTR(q->getSharedFromThis())); - - if (toBeStored) - storeInDb(); - + if ((getContentType() != ContentType::Imdn) && (getContentType() != ContentType::ImIsComposing)) { + linphone_chat_room_notify_chat_message_should_be_stored(chatRoom, L_GET_C_BACK_PTR(q->getSharedFromThis())); + + if (toBeStored) + storeInDb(); + } shared_ptr event = make_shared( ::time(nullptr), q->getSharedFromThis() ); @@ -463,7 +461,9 @@ void ChatMessagePrivate::notifyReceiving () { // Legacy q->getChatRoom()->getPrivate()->notifyChatMessageReceived(q->getSharedFromThis()); - q->sendDeliveryNotification(LinphoneReasonNone); + if ((getContentType() != ContentType::Imdn) && (getContentType() != ContentType::ImIsComposing)) { + q->sendDeliveryNotification(LinphoneReasonNone); + } } LinphoneReason ChatMessagePrivate::receive () {