From ae087952744b42be0b3653e48506d131373f5e69 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Tue, 14 Sep 2021 14:40:44 +0200 Subject: [PATCH] Fix : Do not show received message notification for outgoing message --- linphone-app/src/components/core/CoreHandlers.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/linphone-app/src/components/core/CoreHandlers.cpp b/linphone-app/src/components/core/CoreHandlers.cpp index 7b8ebc649..d7997a20f 100644 --- a/linphone-app/src/components/core/CoreHandlers.cpp +++ b/linphone-app/src/components/core/CoreHandlers.cpp @@ -187,6 +187,8 @@ void CoreHandlers::onMessageReceived ( const shared_ptr &chatRoom, const shared_ptr &message ) { + if( message->isOutgoing() ) + return; const string contentType = message->getContentType(); if (contentType == "text/plain" || contentType == "application/vnd.gsma.rcs-ft-http+xml") { @@ -209,15 +211,7 @@ void CoreHandlers::onMessageReceived ( if ( !app->hasFocus() || - !CoreManager::getInstance()->getTimelineListModel()->getChatRoomModel(chatRoom, false) - /* - !CoreManager::getInstance()->chatRoomModelExists( - Utils::coreStringToAppString(chatRoom->getPeerAddress()->asStringUriOnly()), - Utils::coreStringToAppString(chatRoom->getLocalAddress()->asStringUriOnly()), - chatRoom->getSecurityLevel() == linphone::ChatRoomSecurityLevel::Encrypted - || chatRoom->getSecurityLevel() == linphone::ChatRoomSecurityLevel::Safe - - )*/ + !CoreManager::getInstance()->getTimelineListModel()->getChatRoomModel(chatRoom, false) ) core->playLocal(Utils::appStringToCoreString(settingsModel->getChatNotificationSoundPath())); }