From 3e80b1ecaa518f89f2cae1ccf431771fa1098f0b Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Wed, 21 Apr 2021 13:46:53 +0200 Subject: [PATCH] Dont show notification from inactive chats --- protocol/local_notifications.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protocol/local_notifications.go b/protocol/local_notifications.go index 9b284de9a..1faaa3ce6 100644 --- a/protocol/local_notifications.go +++ b/protocol/local_notifications.go @@ -18,6 +18,10 @@ type NotificationBody struct { } func showMessageNotification(publicKey ecdsa.PublicKey, message *common.Message, chat *Chat, responseTo *common.Message) bool { + if chat != nil && !chat.Active { + return false + } + if chat != nil && (chat.OneToOne() || chat.PrivateGroupChat()) { return true }