From 38a16b355458e51489326e797dadb7c586f937f3 Mon Sep 17 00:00:00 2001 From: jo-mut Date: Fri, 25 Feb 2022 00:36:09 +0300 Subject: [PATCH] disables notifications for muted chats --- VERSION | 2 +- protocol/messenger.go | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index 6ebb6dd91..c5556229e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.94.8 \ No newline at end of file +0.94.9 \ No newline at end of file diff --git a/protocol/messenger.go b/protocol/messenger.go index dc4828951..169002492 100644 --- a/protocol/messenger.go +++ b/protocol/messenger.go @@ -2888,12 +2888,14 @@ func (r *ReceivedMessageState) addNewMessageNotification(publicKey ecdsa.PublicK return fmt.Errorf("contact ID '%s' not present", contactID) } - if showMessageNotification(publicKey, m, chat, responseTo) { - notification, err := NewMessageNotification(m.ID, m, chat, contact, r.AllContacts, profilePicturesVisibility) - if err != nil { - return err + if !chat.Muted { + if showMessageNotification(publicKey, m, chat, responseTo) { + notification, err := NewMessageNotification(m.ID, m, chat, contact, r.AllContacts, profilePicturesVisibility) + if err != nil { + return err + } + r.Response.AddNotification(notification) } - r.Response.AddNotification(notification) } return nil