From 6da095454c91f0e7bf2c67fcfda965a4f2a681cc Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 22 Feb 2018 17:34:07 +0100 Subject: [PATCH] make sure imdm are still passed to the application if deliver_imdn setting is set to 1 --- src/chat/chat-message/chat-message.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 () {