disables notifications for muted chats

This commit is contained in:
jo-mut 2022-02-25 00:36:09 +03:00 committed by John M. Ngei
parent 7d956bef94
commit 38a16b3554
2 changed files with 8 additions and 6 deletions

View File

@ -1 +1 @@
0.94.8
0.94.9

View File

@ -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