Notify reactions only on our messages.

This commit is contained in:
Julien Wadel 2024-04-11 14:08:49 +02:00
parent a68fa9bed1
commit 1c18288fba
2 changed files with 5 additions and 1 deletions

View file

@ -32,6 +32,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

View file

@ -331,7 +331,10 @@ void CoreHandlers::onNewMessageReaction(const std::shared_ptr<linphone::Core> &
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()