diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b808e897..48039ecda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Option to mute chat reactions. +- Notify reactions only on local accounts messages. ## 5.2.3 - 2024-03-29 diff --git a/linphone-app/src/components/core/CoreHandlers.cpp b/linphone-app/src/components/core/CoreHandlers.cpp index 8f19cfcc1..37213c25e 100644 --- a/linphone-app/src/components/core/CoreHandlers.cpp +++ b/linphone-app/src/components/core/CoreHandlers.cpp @@ -331,7 +331,10 @@ void CoreHandlers::onNewMessageReaction(const std::shared_ptr & appSettings.beginGroup("chatrooms"); - if( !message || CoreManager::getInstance()->getAccountSettingsModel()->findAccount(reaction->getFromAddress()) || !settingsModel->getChatReactionsNotificationsEnabled()) + // 0. Do not notify if there is no message, it is our reaction, the notification has been deactivated or the message is not ours. + if( !message || CoreManager::getInstance()->getAccountSettingsModel()->findAccount(reaction->getFromAddress()) || !settingsModel->getChatReactionsNotificationsEnabled() + || !CoreManager::getInstance()->getAccountSettingsModel()->findAccount(message->getFromAddress()) + ) return; // 1. Do not notify if chat is not activated. if (chatRoom->getCurrentParams()->getEncryptionBackend() == linphone::ChatRoom::EncryptionBackend::None && !settingsModel->getStandardChatEnabled()